I have a dataframe, df
Size Total ID
110 TB 200 TB A
110 G 300 G B
500 A 700 A C
Desired output:
Size Total ID
110 200 A
110 300 B
500 700 C
What I am doing:
df[['Size','Total']] = df[['Size','Total']].apply(lambda x:
x.str.strip(' TB', 'G'))
This specifies the exact value, but how would I remove any value that is not a number value? (Just in case I do not know what the specific value is)
Any suggestion is appreciated