AI engineering glossary · NumPy pandas visualization

What is fillna?

fillna: A pandas method that replaces missing values with a value you choose, such as zero, the column mean, or the previous value. It is a basic way to impute gaps, but the choice of replacement changes later statistics, so it should suit the data.

Level: beginnerTopic: NumPy pandas visualization

fillna: an example

df['age'].fillna(df['age'].median()) fills blank ages with the median age.

Related terms

More NumPy pandas visualization terms

Where you learn it

fillna is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.