Tutorials References Exercises Videos Menu
Website Get Certified Pro NEW

Pandas DataFrame isnull() Method

❮ DataFrame Reference


Example

Replace all values in the DataFrame with True for NULL 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.isnull()
Try it Yourself »

Definition and Usage

The isnull() method returns a DataFrame object where all the values are replaced with a Boolean value True for NULL values, and otherwise False.


Syntax

dataframe.isnull()

Parameters

This method takes no parameters.


Return Value

A DataFrame with Boolean values.


❮ DataFrame Reference