null_cols = df.columns[df.isnull().all()] df.drop(null_cols, axis = 1, inplace = True)
df = df[df.columns[~df.isnull().all()]]