Home > other >  How does pandas.DataFrame.replace works?
How does pandas.DataFrame.replace works?

Time:05-11

I need to remove '$' symbol in 'price' column. I used pd.DataFrame.replace to do that.

replace result.

Why did nothing happen?

If I use str.replace it works: str.replace

CodePudding user response:

Try this :

listings['price'].str.replace({'$':''},regex=True,inplace=True)
  • Related