I have a dataframe of values.
mydf.head():
Amount Date Description
0 39.95 2017-03-30 Paypal *A2zkidsltd
1 2.39 2017-04-01 Mcdonalds
2 8.03 2017-04-01 Wm Morrison
3 34.31 2017-04-01 Wm Morrison
4 10.56 2017-04-03 Asda Superstore
I wish to replace all "*" with nothing. I use the pandas replace function on the Description column.
mydf['Description'].replace('*','', inplace=True)
And look again at the result:
mydf.head()
0 39.95 2017-03-30 Paypal *A2zkidsltd
1 2.39 2017-04-01 Mcdonalds
2 8.03 2017-04-01 Wm Morrison
3 34.31 2017-04-01 Wm Morrison
4 10.56 2017-04-03 Asda Superstore
The first transaction still contains a "*".
This is seen for all transactions containing "*".
I have looked at the documentation;
https://pandas.pydata.org/pandas-docs/version/0.22.0/generated/pandas.DataFrame.replace.html
However I do not see where I am going wrong. What is the error in my code or my approach?