How to treat NULL as a normal string with pandas?

后端 未结 4 1501
情书的邮戳
情书的邮戳 2020-12-09 15:34

I have a csv-file with a column with strings and I want to read it with pandas. In this file the string null occurs as an actual value and should not be regarde

4条回答
  •  清歌不尽
    2020-12-09 16:06

    Other answers are better for reading in a csv without "null" being interpreted as Nan, but if you have a dataframe that you want "fixed", this code will do so: df=df.fillna('null')

提交回复
热议问题