Nans not removed after dropna

后端 未结 1 1210
一向
一向 2021-01-24 05:19

i have a dataframe of 400 x 25. i am supposed to remove ALL Nans from the dataset and then select only 3 columns to work on from the 25 columns. I have done this using:

相关标签:
1条回答
  • 2021-01-24 05:25

    assign back:

    df = df.dropna(axis=0)
    

    by default it's not inplace unless you say so:

    df.dropna(axis=0, inplace=True)
    

    Check the docs

    0 讨论(0)
提交回复
热议问题