Jupyter notebooks working through the everyday mechanics of analysis in pandas: preparing messy data, filtering it, combining it, and turning it into something a business can act on.
Written in 2020 alongside my MSc Data Analytics. This is learning and exploration work, kept public for the fundamentals it shows rather than as production code.
| Notebook | What it covers |
|---|---|
| Data Preparation | Cleaning, type handling and reshaping a raw extract into an analysable frame |
| Filtering | Selecting, slicing and conditional filtering patterns in pandas |
| Combining data | Merging every CSV in a directory into a single frame |
| Sales data analysis | Exploratory analysis of sales performance, with aggregation and visualisation |
| Marketing campaign analysis | Campaign response analysis over the bundled marketing dataset |
| Customer segmentation | Grouping customers by behaviour to support targeting decisions |
Python · pandas · NumPy · matplotlib · scikit-learn · Jupyter
pip install -r requirements.txt
jupyter notebookOne notebook is self-contained; the rest read inputs that were never committed. Rather than pretend otherwise, here is exactly what each needs, and the schema to match if you substitute your own.
| Notebook | Input | Status |
|---|---|---|
| Marketing campaign analysis | Marketing Campaign data.csv | included — runs as-is |
| Customer Segmentation | Online Retail.csv | not included. Needs CustomerID, InvoiceDate, InvoiceNo, Quantity, UnitPrice — the standard schema of the UCI Online Retail dataset, which is what the RFM analysis is built for |
| Sales data analysis · Combining data | Sales_Data/ — twelve monthly CSVs | not included. Each needs Order ID, Product, Quantity Ordered, Price Each, Order Date, Purchase Address |
| Filtering | Summer.csv | not included. Needs at least product_id and title_orig |
| Data Preparation | EnquiryTotal.csv | not included — fabricated travel-enquiry data, not a public dataset |
The two travel-enquiry datasets were fabricated for coursework and are not redistributable public sets. The others follow well-known public schemas, so any file matching the columns above will drive the notebook.
For current work, see rag-eval-harness and medallion-duckdb.