16. End-to-End Project: Blinkit Maharashtra
16.4 EDA + Charts
import matplotlib.pyplot as plt
import seaborn as sns
sns.set_theme(style="whitegrid")
print(df["city"].value_counts())
print(df.groupby(df["order_date"].dt.day)["order_id"].count().head())
daily = df.groupby("order_date", as_index=False)["order_id"].count()
fig, ax = plt.subplots(figsize=(8, 4))
ax.plot(daily["order_date"], daily["order_id"], marker="o")
ax.set_title("Daily order lines — fictional Blinkit Maharashtra Oct 2026")
ax.set_ylabel("Order lines")
fig.autofmt_xdate()
fig.tight_layout()
fig.savefig("figures/daily_orders.png", dpi=120)
city_gmv = df[df["status"] == "Delivered"].groupby("city")["amount"].sum().sort_values()
fig, ax = plt.subplots(figsize=(8, 4))
city_gmv.plot(kind="barh", ax=ax)
ax.set_title("Delivered GMV by city (fictional)")
ax.set_xlabel("GMV (₹)")
fig.tight_layout()
fig.savefig("figures/city_gmv.png", dpi=120)
What you should see. A mid-October lift in daily counts; Pune near the top of Delivered GMV in this generator.