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?
CodePudding user response:
Would this work ?
df['column1']=df['column1'].str.replace('\x00\x00\x00','')