A box-and-whisker plot, or boxplot, summarizes a numeric distribution as a graphical five-number summary. The box runs from the 25% quartile to the 75% quartile, with a line at the median; whiskers extend above and below it. This makes distribution shape and unusual values easier to inspect than a table of descriptive statistics alone. section 11.4 section 11.6
In pandas, create a boxplot with plot.box() on a Series for one numeric variable, or on a DataFrame for numeric columns. Use side-by-side plots to compare related measures or groups, such as minimum versus maximum temperature or values across cities. section 11.4 section 11.5
Use boxplots to answer practical distribution questions:
- Inspect a variable’s typical range and its quartiles, median, and extremes. section 11.4
- Find plotted outliers: pandas treats values at least 1.5 × IQR below the 25% quartile or above the 75% quartile as outliers. section 11.6
- Compare distributions across categories, including cities, months, or states. section 11.5 section 11.18
Compare taxi charges by month
With Seaborn, treat month as the category on the x axis and total_amount as the numeric values on the y axis. sns.catplot(x='month', y='total_amount', data=df, kind='box') produces one boxplot per month, supporting a visual comparison of their distributions alongside grouped mean values. section 11.18
sns.catplot(x='month', y='total_amount', data=df, kind='box')
This concise Seaborn call maps categories to month, values to total_amount, and requests a boxplot. section 11.18





