Python Pandas Dataframe, remove all rows where 'None' is the value in any column

前端 未结 3 1760
我在风中等你
我在风中等你 2021-02-01 17:02

I have a large dataframe. When it was created \'None\' was used as the value where a number could not be calculated (instead of \'nan\')

How can I delete all rows that h

3条回答
  •  礼貌的吻别
    2021-02-01 17:56

    Thanks for all your help. In the end I was able to get

    df = df.replace(to_replace='None', value=np.nan).dropna()

    to work. I'm not sure why your suggestions didn't work for me.

提交回复
热议问题