Answers for "how to remove a df column if whole column data is zero"

2

pandas drop empty columns

DataFrameName.dropna(axis=1, how='all', inplace=True)
Posted by: Guest on March-12-2021
1

delete unnamed 0 columns

df.drop(df.filter(regex="Unnamed"),axis=1, inplace=True)
Posted by: Guest on August-31-2021

Code answers related to "how to remove a df column if whole column data is zero"

Python Answers by Framework

Browse Popular Code Answers by Language