liveBook · Manning

Median

As explained in Grokking Machine Learning

The median is the middle value of an ordered set of values, or the average of the two middle values when the set has even size.

The median is a middle-value summary used to replace missing numbers. It offers an alternative to the average when filling gaps in a useful column. section 13.2

Filling missing ages

The Age column contains 177 missing values among 891 rows. Calculating its median gives 28, which can replace each missing age while preserving the column. section 13.2

How Grokking Machine Learning covers it

How deep it goes
Applies the median through a concrete missing-data workflow but does not develop its mathematical calculation.
Examples
Demonstrates replacing 177 missing Age values with the calculated median of 28 in an 891-row dataset.
What you can do after
Apply it via median and fillna functions to replace missing numeric entries.
How it connects
Connects the median to missing data, averages, data cleaning, and imputation.

Also explained in

Compare how 7 books explain median →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Machine Learning. The section links point to the parts of the book it draws on.