When I try:
df['Value'] = df['Value'].str.replace(',', '.').replace(' ', '').astype(float)
It would throw below error:
ValueError: could not convert string to float: '-1 750.5'
But when I use:
df['Value'] = df['Value'].apply(
lambda x: float(x.replace(',', '.').replace(' ', '')))
It would work. What I am doing wrong here?