I am using a simple .replace method on a simple pandas dataframe. I believe I am coding it correct. What am I missing?
I have given the documentation a look, but I can't find the problem.
import pandas as pd
data =[1,2,3,4,5]
df = pd.DataFrame(data)
df.replace('5', 'T')
print(df)
I would like the value of 5 to be replaced with a T. However, nothing happens. I also do not get any error.