Rechercher et supprimer des colonnes vides dans le dataframe grâce/via Pandas en Python.
# Find the columns where each value is null
cols_vides = [col for col in df.columns if df[col].isnull().all()]
# Drop these columns from the dataframe
df.drop(cols_vides,
axis=1,
inplace=True)
Find the columns where each value is null
cols_vides = [col for col in df.columns if df[col].isnull().all()]
Drop these columns from the dataframe
df.drop(cols_vides, axis=1, inplace=True)