Pandas has built-in plotting via .plot (backed by Matplotlib) — the fastest way to see your data during analysis, without leaving the DataFrame.
Plot kinds
ts["sales"].plot() # line (great for time series)df["package"].plot(kind="hist", bins=20) # distributiondf["programme"].value_counts().plot(kind="bar") # category countsdf.plot(kind="scatter", x="age", y="package") # relationship
Plotting grouped results
(df.groupby("programme")["package"].mean().plot(kind="barh", title="Avg package by programme"))
Key takeaways
- 01df/Series .plot() draws quick charts backed by Matplotlib.
- 02kind= selects line, hist, bar, barh, scatter, box and more.
- 03Plot aggregated results by chaining .plot after groupby.
- 04Use it for exploration; use Matplotlib/Seaborn for polished visuals.
