Skip to content

Commit 6b6a848

Browse files
authored
Merge pull request #95 from aviraltayal946/main
Automated EDA Report Generator
2 parents 4d6a97f + cbfc0b9 commit 6b6a848

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Automated EDA Report Generator
2+
3+
A simple tool to generate an HTML EDA (Exploratory Data Analysis) report from a CSV file.
4+
5+
Features:-
6+
Generates HTML report from CSV
7+
Uses pandas and ydata-profiling
8+
Easy to run locally or automate with n8n
9+
10+
*INSTALLATION*
11+
git clone https://github.com/<your-username>/automated-eda-report-generator.git
12+
cd automated-eda-report-generator
13+
python -m venv .venv
14+
source .venv/bin/activate # Windows: .venv\Scripts\activate
15+
pip install -r requirements.txt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import pandas as pd # type: ignore
2+
from ydata_profiling import ProfileReport
3+
import os
4+
import argparse
5+
6+
# Default input/output
7+
DEFAULT_INPUT = 'data.csv'
8+
DEFAULT_OUTPUT = 'report.html'
9+
10+
# Parse command-line arguments
11+
parser = argparse.ArgumentParser(description="Generate HTML EDA report from CSV")
12+
parser.add_argument("--input", "-i", default=DEFAULT_INPUT, help="Path to CSV file")
13+
parser.add_argument("--output", "-o", default=DEFAULT_OUTPUT, help="Path to save HTML report")
14+
args = parser.parse_args()
15+
16+
input_path = args.input
17+
output_path = args.output
18+
19+
# Check input file exists
20+
if not os.path.exists(input_path):
21+
print(f"Input file '{input_path}' not found.")
22+
exit(1)
23+
24+
# Read CSV and generate report
25+
df = pd.read_csv(input_path)
26+
profile = ProfileReport(df, title="Automated EDA Report", explorative=True)
27+
os.makedirs(os.path.dirname(output_path) or '.', exist_ok=True)
28+
profile.to_file(output_path)
29+
30+
print(f"✅ Report generated: {output_path}")

0 commit comments

Comments
 (0)