liveBook · Manning

Fillna

fillna is a pandas method that replaces missing values in a Series or DataFrame with specified or computed values.

How 2 Manning books explain it

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

A pandas method that replaces missing values with a specified value or computed replacement.

How it is used
Replaces missing Series or DataFrame values with literal or computed alternatives during data cleaning and transformation.
How deep it goes
Explains literal, mean, and mode replacements, returned objects, reassignment, and the tradeoff between filling and dropping values.
Examples
Demonstrates filling missing tens digits with zero and imputing Titanic ages with a mean and destinations with a mode.
What you can do after
Apply it via pandas to replace missing values with literals or statistics and preserve the result through reassignment.

Read how Pandas Workout: 200 exercises to make you a stronger data analyst explains fillna →

Grokking Machine Learning

fillna is a Pandas operation that replaces missing entries with a specified value or computed replacement.

How it is used
Preserves useful dataset columns by replacing missing entries during data cleaning.
How deep it goes
Demonstrates median and category replacements with executable column assignments, but does not detail fillna options.
Examples
Uses Titanic Age values filled with median 28 and Embarked values filled with the category U.
What you can do after
Apply it via Pandas to replace numeric or categorical missing values in a cleaned DataFrame.

Read how Grokking Machine Learning explains fillna →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.