I have this sample data from Kaggle https://www.kaggle.com/datasets/gregorut/videogamesales enter image description here and the sales data have mixed type. for ex, it has 0.04, 50K.... extras so it gets object as type. I want to change the -K, -M things as int and multiply 1000, 100 each. so I tried this and didn't work
what should I do?
for x in df['NA_Sales']: if type(x) is object: (x.replace('M','')) & (x*100) elif type(x) is float: x*100
preprocessing(df['NA_Sales'])
df['NA_Sales']
for x in df['NA_Sales']: if type(x) is object: (x.replace('M','')) & (x*100) elif type(x) is float: x*100
preprocessing(df['NA_Sales'])
df['NA_Sales']