Reputation: 565
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.
Upvotes: 0
Views: 316
Reputation: 862601
Use:
mask = df.fillna('').isin(["", "nan", "NaT"])
df = df[~mask.all(axis=1)]
Upvotes: 3