A simple Flask web app to upload a CSV (or use the bundled sample) and explore, clean, and analyze book bestseller data with pandas.
- Upload your own
.csvor use the sample dataset. - Raw data exploration: preview, shape, columns, and numeric summary.
- Cleaning: remove duplicates, standardize column names, and fix numeric types.
- Analysis: top authors by count and total reviews, high-rated books (>= 4.8), genre performance (avg rating, avg reviews, median price), and yearly distribution.
- Ensure Python 3.10+ is installed.
- Install deps:
pip install flask pandas
- Run the app:
python app.py
- Open
http://127.0.0.1:5000/in your browser. - Upload your CSV or click "Use Sample CSV".
The app adapts to common column names:
- Title:
TitleorName - Rating:
RatingorUser Rating - Year:
Publication YearorYear - Optional:
Author,Reviews,Price,Genre
.
├── app.py # Flask app (web UI)
├── main.py # CLI helpers and cleaning/analysis logic
├── templates/
│ └── index.html # HTML template (English)
├── bestsellers with categories.csv # Sample dataset
├── cleaned_bestsellers.csv # Example cleaned output (optional)
├── .gitignore # Typical Python/Flask ignores
├── .gitattributes # Text normalization
└── LICENSE # Project license
app.pyreusesclean(df)frommain.pywhen available; includes a safe fallback.- Cleaning standardizes names (
Name→Title,User Rating→Rating,Year→Publication Year), drops duplicates, and coerces numeric columns. - Jinja template uses explicit
is not nonechecks to avoid pandas truthiness errors.
You can also run the analysis from the terminal:
python main.py --csv path/to/your.csvIt will preview, clean, analyze, and write cleaned_bestsellers.csv next to your input.
This project is licensed under the MIT License. See LICENSE for details.
- Proje: CSV yükleyip keşif/temizlik/analiz yapan basit bir Flask arayüzü.
- Çalıştırma:
pip install flask pandasardındanpython app.pyvehttp://127.0.0.1:5000/adresini açın. - Örnek veri: "Use Sample CSV" ile hazır dosyayı kullanabilirsiniz.