My dataframe looks like this:
I want to delete ALL rows (red marked in the picture) where every column has a value like:
"", "nan", "NaT"
I tried several things like dropna, replacing and dropping, but I am can not make it work to delete it.
CodePudding user response:
Use:
mask = df.fillna('').isin(["", "nan", "NaT"])
df = df[~mask.all(axis=1)]
