nan_cols = [i for i in df.columns if df[i].isnull().any()]
print("No. of columns containing null values")
print(len(df.columns[df.isna().any()]))
print("No. of columns not containing null values")
print(len(df.columns[df.notna().all()]))
print("Total no. of columns in the dataframe")
print(len(df.columns))
df.isnull().values.any()
df['your column name'].isnull().sum()
df['your column name'].isnull().values.any()
# to mark NaN column as True
df['your column name'].isnull()
df['your column name'].isnull().values.any()
df.isnull().sum().sum()
fig, ax = plt.subplots()
plt.bar(df.columns, df.isna().sum())
df['your column name'].isnull()
import pandas as pd
if pd.isnull(float("Nan")):
print("Null Value.")
df[df["A_col"].isnull()]