Following a tutorial is one thing; analysing an unfamiliar dataset is another. Put your Python skills to work with four projects covering data cleaning, time-based patterns, purchase rates and retail sales.
Useful Python data analysis projects begin with a clear question and end with a result you can check and explain. Start with a small comparison, then progress to dates, purchase rates and transaction data as your confidence grows.
Perhaps you can follow a pandas tutorial without difficulty. Then you open a new file and hesitate: which columns matter, what should you calculate, and when is the project finished?
The four projects below give you that direction. Each includes a dataset, prerequisites, tasks, checks, a deliverable and an optional extension. You do not need to train a machine-learning model to complete them.
Choose a project that matches your current skills

Choose the skill you want to practise before choosing the most impressive-sounding topic. A small project with a justified conclusion is more useful practice than a large notebook you cannot explain.
|
Project |
Main skills |
Starting file |
Suggested level |
|
Compare vehicle fuel economy |
Loading, missing-value decisions, grouped summaries |
auto-mpg.data |
Beginner with loading guidance |
|
Analyse bike-rental patterns |
Dates, calendar grouping, comparisons |
day.csv |
Beginner after basic pandas |
|
Compare online purchase rates |
Boolean values, proportions, group sizes |
online_shoppers_intention.csv |
Beginner to intermediate |
|
Build a retail-sales summary |
Excel import, transaction rules, reconciliation |
Online Retail.xlsx |
Intermediate relative to this selection |
These levels describe the work proposed here, rather than official dataset ratings. Start where you can complete the core task; save the extension for later.
What you need before starting
You should be able to assign variables, work with lists, use conditions and call functions. For pandas, practise selecting columns, filtering rows and calculating a grouped summary.
If those operations are still unfamiliar, begin with . Pandas for Data Analysis: A Practical Beginner’s Guide.
Use Python, pandas, Matplotlib and a notebook environment such as Jupyter Notebook. The Excel project also needs a suitable Excel-reading dependency, such as openpyxl. Follow the pandas installation guidance and Excel input/output reference for setup details.
For each project, keep the original download unchanged. Put your notebook and generated outputs in separate working locations. Record the source, download date and package versions so someone else can follow your work.
The loading examples below assume the named source file is in the notebook’s working folder. They are starting points, not complete solutions.
Project 1: Compare fuel economy across vehicle groups
Business question
How does recorded fuel economy differ across cylinder groups and model years in this historical sample?
Imagine preparing a comparison for someone who wants to understand the dataset before considering any modelling. Your job is to describe the records, not recommend a modern vehicle.
Dataset
Download Auto MPG from the UCI Machine Learning Repository. Extract and use auto-mpg.data, rather than the separate original file. UCI documents historical city-cycle fuel economy in miles per gallon and identifies horsepower as containing missing values.
The checked file contains 398 rows and nine columns, including the vehicle name. It has no header row, uses whitespace separators and represents missing horsepower with ?.
Prerequisites
Basic DataFrame inspection, selecting columns and grouping records. The import needs more explanation than a standard CSV because you must provide the column names and missing-value marker.
Tasks
Start by loading the file:
import pandas as pd
columns = [
"mpg", "cylinders", "displacement", "horsepower",
"weight", "acceleration", "model_year", "origin", "car_name"
]
cars = pd.read_csv(
"auto-mpg.data",
sep=r"\s+",
names=columns,
na_values="?"
)
Then:
-
Inspect the shape, column types and missing values.
-
Group by cylinders and calculate the number of records, mean MPG and median MPG.
-
Repeat an appropriate comparison by model_year.
-
Plot the grouped results with the sample period and MPG measure clearly labelled.
-
Write a short explanation separating observations from possible explanations.
Checks
Expect 398 records and six missing horsepower values in the checked source file. Do not discard those records automatically when your calculation only uses MPG and cylinders.
Show group sizes. A mean based on a few vehicles deserves different treatment from one based on many records. Confirm that the group counts add up to the included records.
Deliverable
Produce a summary table, one clearly labelled chart and a findings paragraph. State that the sample is historical and that the comparisons do not isolate causal effects.
Extension
Compare cylinder groups within selected model years. Explain whether changing the comparison changes your interpretation.
Project 2: Analyse bike-rental patterns over time
Business question
How do average daily rentals differ by month and working-day status?
Your task is to describe observed rental patterns and identify questions worth investigating further. You are not forecasting demand or proving why it changed.
Dataset
Use UCI’s Bike Sharing dataset, which contains daily and hourly rental counts from Capital Bikeshare for 2011 and 2012, with calendar and weather information.
Start with day.csv. The downloaded file checked for this article contains 731 daily records. Keep hour.csv for the extension rather than mixing both levels of aggregation.
Prerequisites
Basic grouping and plotting, plus an introduction to dates. Read the supplied documentation before interpreting coded categories or weather fields.
Tasks
Load the daily file and parse its date column:
import pandas as pd
bikes = pd.read_csv("day.csv", parse_dates=["dteday"])
bikes["month"] = bikes["dteday"].dt.to_period("M")
Then:
-
Check the date range, uniqueness of dates and missing values.
-
For each year-month, calculate the number of recorded days, total rentals and average daily rentals.
-
Compare average daily rentals for working and non-working days.
-
Draw a monthly chart and a separate working-day comparison.
-
Describe what the summaries show without assigning a cause.
Keep the year in your monthly grouping. Combining January 2011 and January 2012 answers a different question from following the sequence of calendar months.
Checks
Verify that casual + registered equals cnt in every included row. This check passed in the inspected daily file.
Report the number of days behind each average. Monthly totals are influenced by the number of observed days, so do not treat a larger total as automatically indicating a higher daily average.
Check weather definitions before adding them. Normalised temperature values must not be labelled as ordinary Celsius measurements.
Deliverable
Produce a monthly trend chart, a working-day comparison and a short explanation of the observed differences. Identify what extra evidence would be needed to explain them.
Extension
Use hour.csv to compare hourly profiles. Check date-hour coverage before interpreting absent hours, and do not silently turn missing records into zero rentals.
Project 3: Compare purchase rates across visitor groups
Business question
How does the proportion of sessions ending in a purchase differ across visitor types?
Imagine a marketing colleague points to the group with the most purchases and calls it the strongest performer. Your task is to check whether the conclusion changes when group sizes are considered.
Dataset
Download UCI’s Online Shoppers Purchasing Intention dataset. The checked CSV contains 12,330 sessions and 18 columns. UCI describes the sessions as belonging to different users.
The Revenue field indicates whether a purchase occurred. It is not a monetary amount. This project compares purchase proportions, not total sales revenue.
Prerequisites
Boolean values, grouping and percentages. You should understand the difference between a count and a rate.
Tasks
Load the data:
import pandas as pd
sessions = pd.read_csv("online_shoppers_intention.csv")
print(sessions["Revenue"].dtype)
print(sessions["Revenue"].value_counts(dropna=False))
Then:
-
Inspect the visitor-type categories and check for missing values.
-
Count all sessions in each group.
-
Count sessions where Revenue is True.
-
Divide purchase sessions by all included sessions in that group.
-
Present counts and rates together, then create a comparison chart.
Define the denominator explicitly. For this project:
Purchase rate = purchase sessions ÷ included sessions.
Checks
Confirm that the outcome is Boolean before calculating with it. In the tested environment, the file loaded with 1,908 True values and 10,422 False values.
Reconcile grouped counts with the overall included sample. Check that rates fall between zero and one before formatting them as percentages.
Keep group sizes visible. An apparently high rate in a small group should prompt caution, not an immediate marketing recommendation.
Deliverable
Produce a table showing sessions, purchase sessions and purchase rate, alongside one chart and a findings paragraph. Explain why the group with the most purchases may not have the highest purchase rate.
Extension
Compare visitor groups separately for weekend and non-weekend sessions. Report the resulting subgroup sizes and describe the association without claiming that visitor type or weekend status causes purchasing.
Project 4: Build a checked retail-sales summary
Business question
What sales-value patterns appear across complete months and countries under a documented inclusion rule?
Here, deciding what belongs in the calculation is part of the project. A chart of every row multiplied together is not enough.
Dataset
Download UCI’s Online Retail dataset and extract Online Retail.xlsx. UCI documents product quantities, invoice dates, prices in sterling and invoice codes indicating cancellations.
The inspected workbook contains 541,909 transaction lines and eight columns. It includes missing descriptions and customer identifiers, so inspect the file even if a catalogue summary suggests otherwise.
Prerequisites
Reading Excel files, working with dates, filtering, creating calculated columns and grouping. This is the most demanding project in the selection because transaction rules need careful explanation.
Tasks
Load the workbook:
import pandas as pd
retail = pd.read_excel("Online Retail.xlsx")
retail["InvoiceNo"] = retail["InvoiceNo"].astype("string")
Use this initial scope: analyse positive-quantity, positive-price lines that are not marked as cancellations, within complete calendar months. Describe the result as the sales value of those included lines, not net revenue or profit.
-
Inspect dates, missing fields, quantities, prices and cancellation codes.
-
Document which records meet the scope and which are excluded.
-
Calculate Quantity × Unit Price for included lines.
-
Summarise by year-month and by country.
-
Reconcile each summary with the included line-value total.
-
Write a report explaining the scope and what is missing from it.
Retain the excluded records separately so you can explain the rule’s effect. Do not claim this treatment fully accounts for returns or cancellations financially.
Checks
The inspected dates run from 1 December 2010 to 9 December 2011. December 2011 is incomplete; leave it out of a complete-month comparison or display it separately with a clear label.
A repeated invoice number can represent several product lines. Do not remove rows merely because InvoiceNo repeats, and do not call the number of lines the number of orders.
The checked file contains 135,080 missing customer IDs. A missing ID does not automatically make an otherwise suitable line unusable for this sales summary. It does prevent you from assigning that line to an identified customer in a customer-level extension.
Deliverable
Produce a monthly sales-value table, a country comparison, a cleaning log and a short report. Explain exclusions, incomplete periods and the difference between the calculated measure and profit.
Extension
For records with usable customer identifiers, compare order frequency by counting distinct qualifying invoices per customer. State how missing IDs and excluded lines affect the sample. Count invoices rather than treating each product line as a separate purchase.
Turn your analysis into a project someone else can review
A project is ready to share when another person can understand the question, reproduce the steps and assess your conclusion.
Include:
-
The question, scope and meaning of each row.
-
Dataset source, credited creator, licence and download date.
-
Package versions and execution instructions.
-
Cleaning decisions, exclusions and relevant checks.
-
Labelled tables and charts with units.
-
Findings that answer the question, followed by limitations.
Restart the notebook’s kernel and run the cells from the beginning. Check that the saved outputs match the final code rather than an earlier experiment.
All four UCI pages list CC BY 4.0. When sharing source material or modified subsets, provide appropriate credit, link the licence and identify changes. The Creative Commons licence summary explains these conditions. A project README is a suitable place to record the source citation and your changes.
For wider context on querying, analysis and communication, read SQL, Python, Power BI: Skills Germany Wants. Use it to place these exercises within broader skills development, rather than treating four projects as complete career preparation.

Choose your next task or strengthen your foundations
Use the point where you struggled to choose your next step. If grouping and filtering were difficult, revisit the pandas guide. If you could follow an example but could not adapt it, practise functions, conditions and debugging before increasing the project size.
The Python Programming Bootcamp (Data Analysis & Automation) lists Python fundamentals, reusable functions, file operations, pandas analysis, visualisation and automation. Compare those topics with the gap your project revealed.
For example, functions help organise repeated preparation steps, while file handling supports repeatable imports. Apply those foundations to one small project before attempting a larger process.
These four projects are practice recommendations for this article; they are not presented as confirmed course assignments. Course completion alone does not establish advanced proficiency or readiness for a particular job.