# Pandas Sales Analysis & Reproducible Report

TechBuilt Open School — Free, self-guided technical project kit

- **Track:** Data Analysis
- **Level:** Beginner
- **Access:** No account, signup, payment or enrollment required
- **Format:** Guided plan and runnable starter example, not a complete solution or a live class
- **Online guide:** https://techbuiltos.online/projects/pandas-sales-dashboard

## Project goal

Learn data cleaning, vectorized operations and reproducible KPI calculations with Pandas.

Clean a tiny sales dataset, calculate product revenue and communicate one clearly supported business observation.

## Before you begin

- Python 3 and pip
- Pandas DataFrame basics

## Local setup

1. Create a virtual environment and install pandas.
2. Save the starter as sales.py and run python sales.py.
3. Use anonymized or synthetic practice data only; no client or student records.

## Starter example — sales.py

The sample below is a starting point. It may require the prerequisites above. Complete the subsequent milestones to finish your own project.

```python
import pandas as pd

records = [
    {"product": "Notebook", "units": 2, "price": 150},
    {"product": "Pen", "units": 5, "price": 40},
    {"product": "Notebook", "units": 1, "price": 150},
]
df = pd.DataFrame(records)
df["revenue"] = df["units"] * df["price"]
summary = (
    df.groupby("product", as_index=False)
      .agg(units=("units", "sum"), revenue=("revenue", "sum"))
      .sort_values("revenue", ascending=False)
)
print(summary.to_string(index=False))
```

## Build milestones

1. Inspect missing values and duplicated rows before calculating totals.
2. Create a line total as units multiplied by price.
3. Group by product and compare revenue, quantity and order counts.
4. Add a Matplotlib visualization with an informative title and labeled axes.
5. Write a short interpretation that distinguishes evidence from speculation.

## Completion checklist

- [ ] Revenue calculations use numeric columns.
- [ ] Missing inputs are handled or visibly reported.
- [ ] A product appears once in grouped output.
- [ ] The summary can be reproduced by another learner from the script.

## Optional extensions

- Read data from a CSV file and write a data-quality report.
- Compare month-over-month KPIs using a documented date column.

## Related learning

- Individual course roadmap: https://techbuiltos.online/courses/pandas
- Individual course roadmap: https://techbuiltos.online/courses/matplotlib
- Individual course roadmap: https://techbuiltos.online/courses/numpy

- Specialization: https://techbuiltos.online/specializations/data-analyst
- Specialization: https://techbuiltos.online/specializations/data-science

---

This original self-study project is independent of paid cohorts. Review any external library documentation before use. Do not commit real credentials, private client files or personal data to public repositories.
