What is the best way to account for (not a number) nan values in a pandas DataFrame?
The following code:
import numpy as np import pandas as pd dfd =
if you only want the summary of null value for each column, using the following code df.isnull().sum() if you want to know how many null values in the data frame using following code df.isnull().sum().sum() # calculate total
df.isnull().sum()
df.isnull().sum().sum() # calculate total