I have a dataframe, df, where I am seeing duplicate or unwanted values within my column. I would like to remove any numerical values that come before the #T ex. hi 1 1.92T,I wish to remove the single '1' to create: hi 1.92T
Data
type value
hi 1 1.92T 5
hello 6 6.4T 5
yy16 1 6 12T 6
free 1 1 12T 7
Gal 0 0 0T 7
ex 8 8 8T 8
Desired
type value
hi 1.92T 5
hello 6.4T 5
yy16 12T 6
free 12T 7
Gal 0T 7
ex 8T 8
Doing
import re
df.type = re.sub("\d+\.?\d+?", "", df.type)
I am still researching this. Any suggestion is appreciated.