liveBook · Manning

Five-number summary

As explained in Pandas Workout: 200 exercises to make you a stronger data analyst

A five-number summary consists of the minimum, first quartile, median, third quartile, and maximum of a numeric distribution.

A five-number summary describes a numeric distribution through its minimum, first quartile, median, third quartile, and maximum. In pandas, describe() returns these values alongside the mean and standard deviation. section 11.4

Read the summary of a Series

For s = Series([10, 15, 17, 20, 25]), s.describe() reports 10 as the minimum, 15 as the 25% quartile, 17 as the median, 20 as the 75% quartile, and 25 as the maximum. The same output also reports count, mean, and standard deviation. section 11.4

s.plot.box()

Run s.plot.box() to display the five-number summary graphically: the box marks the quartiles and median, while the whiskers extend to the minimum and maximum. section 11.4

Boxplots also make unusual observations visible. In pandas, points at least 1.5 times the interquartile range below the first quartile or above the third quartile appear as outliers. section 11.6

How Pandas Workout: 200 exercises to make you a stronger data analyst covers it

How deep it goes
Defines five values, connects them to boxplot features, and explains the 1.5-IQR outlier rule without developing quartile mathematics.
Examples
Uses a five-value Series, Chicago temperatures, date slices, multiple temperature columns, and city-grouped summaries.
What you can do after
Apply it via pandas describe() and plot.box() to summarize distributions, compare subsets, and inspect potential outliers.
How it connects
Connects pandas describe(), Series, DataFrame, boxplots, quartiles, median, interquartile range, and outliers.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Pandas Workout: 200 exercises to make you a stronger data analyst. The section links point to the parts of the book it draws on.