Answers for "pandas dataframe dropna subset column index"

-1

drop columns with nan pandas

>>> df.dropna(axis='columns')
       name
0    Alfred
1    Batman
2  Catwoman
Posted by: Guest on April-02-2020
1

clean nas from column pandas

>>> df.dropna()
     name        toy       born
1  Batman  Batmobile 1940-04-25
Posted by: Guest on April-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language