xxxxxxxxxx
# Check for nan values and store them in dataset named (nan_values)
nan_data = data.isna()
nan_data.head()
xxxxxxxxxx
# position of NaN values in terms of index
df.loc[pandas.isna(df["b"]), :].index
# position of NaN values in terms of rows that cotnain NaN
df.loc[pandas.isna(df["b"]), :]
xxxxxxxxxx
#Python, pandas
#Count missing values for each column of the dataframe df
df.isnull().sum()
xxxxxxxxxx
#return a subset of the dataframe where the column name value == NaN
df.loc[df['column name'].isnull() == True]