Skip to content

Repository files navigation

Python data analysis notebooks

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.

Notebooks

NotebookWhat it covers
Data PreparationCleaning, type handling and reshaping a raw extract into an analysable frame
FilteringSelecting, slicing and conditional filtering patterns in pandas
Combining dataMerging every CSV in a directory into a single frame
Sales data analysisExploratory analysis of sales performance, with aggregation and visualisation
Marketing campaign analysisCampaign response analysis over the bundled marketing dataset
Customer segmentationGrouping customers by behaviour to support targeting decisions

Stack

Python · pandas · NumPy · matplotlib · scikit-learn · Jupyter

Running it

pip install -r requirements.txt
jupyter notebook

Data

One 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.

NotebookInputStatus
Marketing campaign analysisMarketing Campaign data.csvincluded — runs as-is
Customer SegmentationOnline Retail.csvnot 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 dataSales_Data/ — twelve monthly CSVsnot included. Each needs Order ID, Product, Quantity Ordered, Price Each, Order Date, Purchase Address
FilteringSummer.csvnot included. Needs at least product_id and title_orig
Data PreparationEnquiryTotal.csvnot 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.

About

Jupyter notebooks on data preparation, filtering, sales and marketing analysis, and customer segmentation with pandas.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages