Python Pandas replace() not working

后端 未结 3 1282
甜味超标
甜味超标 2020-12-04 04:23

I have some fields that have some junk in them from an upstream process. I\'m trying to delete \'\\r\\nName: hwowneremail, dtype: object\' from a column th

3条回答
  •  无人及你
    2020-12-04 04:46

    As far as I remember, Python Pandas was changed a little bit in replace. You should try passing over a regex keyword argument.

    Like so;

    report_df['Owner'].replace({'\r\nName: hwowneremail, dtype: object':''},regex=True)
    

提交回复
热议问题