So I have a dataframe where a row called 'Months' has entries in form: 1M , 12M etc. So I wanted to get rid of the M letter.
I have tried using the .replace() function but had no success in doing so:
df['Months'].replace('M','')
what is wrong in my implementation and how can I correct it?
Thanks