I have dataframe like below.
Input
df
A B C
1 2 1
NaN 4 2
3 NaN NaN
NaN NaN NaN
4 2 NaN
NaN NaN NaN
Output
A B C
1 2 1
NaN 4 2
3 NaN NaN
4 2 NaN
How can this be done in python
df.dropna(axis = 0, how = 'all')
you can use:
df.dropna(how='all')
you can look into this thread also: How to drop rows of Pandas DataFrame whose value in a certain column is NaN
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With