so i have a pandas dataframe that looks like this :
is there a way to move the errors in Ep and Sbolo to two other column without having to do it by hand? thank you
>Solution :
You can use str.split:
df[['sb1', 'sb2']] = (df['S Bolo'].str.split('\s*\u00b1\s*', expand=True)
.apply(pd.to_numeric, errors='coerce'))
print(df)
# Output
S Bolo sb1 sb2
0 17.90 ± 0.13 17.90 0.13
1 4.43 ± 0.08 4.43 0.08
The unicode value of ± is U+00B1 and do the same for other column.
