Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY CYBERSECURITY DATA SCIENCE
     ❯   

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