Tutorials References Exercises Sign Up Menu
Create Website Get Certified Pro

Pandas DataFrame isna() Method

❮ DataFrame Reference


Replace all values in the DataFrame with True for NOT A NUMBER values, otherwise False:

In this example we use a .csv file called data.csv

import pandas as pd

df = pd.read_csv('data.csv')

newdf = df.isna()
Try it Yourself »

Definition and Usage

The isna() method returns a DataFrame object where all the values are replaced with a Boolean value True for NA (not-a -number) values, and otherwise False.




This method takes no parameters.

Return Value

A DataFrame with Boolean values.

❮ DataFrame Reference