Reputation: 157
I have one dataframe, there is one column, some rows contain '\x00\x00\x00'. I'd like to replace to empty. My code is like this:
df.loc[df['column1']=='\x00\x00\x00','column1'] = ''
After that, when print this column, it's still same, no changes.
Any suggestion?
Upvotes: 0
Views: 884
Reputation: 1137
Would this work ?
df['column1']=df['column1'].str.replace('\x00\x00\x00','')
Upvotes: 1