I have a column in my data frame which has values like \'3.456B\' which actually stands for 3.456 Billion (and similar notation for Million). How to convert this string form
I'd use a dictionary to replace the strings then evaluate as float.
mapping = dict(K='E3', M='E6', B='E9') df['Market Cap'] = pd.to_numeric(df['Market Cap'].replace(mapping, regex=True))