Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d = {'EUR': 1.95, 'USD': 1.90, 'лв.': 1}
- s1 = df_auto['Price'].replace(d, regex=True)
- s2 = df_auto['Price'].str.extract('(\d+\ \d*)',expand = False)
- s2 = s2.str.replace(' ','') # 23 444 --> 23444
- s2 = s2.astype(float)
- df_auto['Price BGN'] = s1 * s2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement