Thursday, November 13, 2025

🟑 PROJECT 2 (Medium): Sales Data Analysis


πŸ“Œ Objective

Analyze monthly sales, find revenue, top product, and trends.

πŸ“Œ Dataset (sample)

MonthProductSales
JanMobile25000
JanLaptop40000
FebLaptop38000
FebMobile30000

πŸ“Œ Project Tasks

✔ 1. Load Data

df = pd.read_csv("sales.csv")

✔ 2. Clean Data

df.dropna(inplace=True) df["Sales"] = df["Sales"].astype(int)

✔ 3. Total Sales

print("Total Revenue:", df["Sales"].sum())

✔ 4. Monthly Sales Summary

monthly = df.groupby("Month")["Sales"].sum() print(monthly)

✔ 5. Best-Selling Product

best = df.groupby("Product")["Sales"].sum().idxmax() print("Best Product:", best)

✔ 6. Plot Monthly Trend

monthly.plot(kind="line")

No comments:

Post a Comment

Python Viva Questions

  Basic Python Viva Questions 1. What is Python? Python is a high-level, interpreted, and object-oriented programming language used for w...