liveBook · Manning

Is_na

As explained in Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

The pandas isna method identifies values that represent missing data.

Use pandas isna to locate missing values before deciding whether to remove, impute, or preserve their patterns as predictive signals. section 2.4.2

Count missing values by feature

data.isna().sum(axis=0) returns booleans for missing entries, then sums True as 1 and False as 0. In the Auto MPG data, mpg has 8 missing cases and horsepower has 6. section 2.4.2

(data.isna()
    .sum(axis=0)         
)                   

Inspect the runnable expression used to count missing samples across columns. section 2.4.2

How Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI covers it

How deep it goes
Explains boolean detection and counting with sum, then stops short of implementing imputation or missingness indicators.
Examples
Demonstrates column-wise counts on the Auto MPG dataset, finding eight missing mpg values and six missing horsepower values.
What it assumes
Assumes a pandas tabular dataset and teaches missing-value detection through boolean results and aggregation.
What you can do after
Diagnose/debug with it, count missing samples by feature, and decide whether missingness needs indicators or imputation.
How it connects
Connects missing data with missing-value imputation, indicator variables, MissingIndicator, IterativeImputer, and predictive patterns.

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 Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI. The section links point to the parts of the book it draws on.