liveBook · Manning

Is_na

As explained in Grokking Machine Learning

is_na is a Pandas operation that identifies missing or null entries in a data structure.

is_na identifies missing or null entries in a Pandas data structure. It returns 1 for NaN and 0 otherwise, so summing the results counts missing values. section 13.2

Counting missing values

For a Titanic dataset, raw_data.isna().sum() reports 177 missing Age values, 687 missing Cabin values, and 2 missing Embarked values. These counts guide whether to remove a column or fill its gaps. section 13.2

Use the result to choose a cleaning action:

  • Fill missing numeric values with a median, as with Age, or categorical gaps with a placeholder such as U. section 13.2

How Grokking Machine Learning covers it

How deep it goes
Defines the binary result and demonstrates summing it by column, then stops at downstream cleaning choices.
Examples
Uses Titanic columns including Age, Cabin, and Embarked to illustrate missing-value counts and repairs.
What it assumes
Assumes familiarity with dataset columns and introduces NaN as missing, unreadable, or nonnumeric data.
What you can do after
Apply it via Pandas to count missing entries and select column-dropping or value-filling actions.
How it connects
Connects missing values with NaN, Pandas DataFrames, column dropping, and filling values.

Also explained in

Compare how 2 books explain is_na →

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.