I have a following df:
import pandas as pd
df = pd.DataFrame({"name" : ["a", "b", "c"], "value" : ['1\xa0412', 4, 2]})
I would like to replace '1\xa0412' with 1. I try this:
df['value'] = df['value'].str.replace(r'\\.*', '', regex=True)
But it does not work. How can I solve it, please?