I have a Pandas dataframe column named 'VALUE' which has string data like this: '-1.459NS' I want to create 2 new columns -> 'VALUE' must have a float -1.459 and UNIT must have a string 'NS'
Is there a Regex and/or Non Regex way of doing this? What is the fastest way of doing this? I have maybe a million + lines over which I want to do this.
>>> d = {'VALUE': ['-1.234NS','0.22MH']}
>>> df=pd.DataFrame(data=d)
>>> df
VALUE
0 -1.234NS
1 0.22MH
I want:
VALUE UNIT
0 -1.234 NS
1 0.22 MH
Where VALUE is float and UNIT is string