When I look at the values in a column in my dataframe, I can see that due to user data entry errors, the same category has been entered incorrectly.
For my dataframe I use this code:
df['column_name'].value_counts()
output:
Targeted 523534
targeted 1
story 25425
story 2
multiple 2524543
For story, I guess there is a space?
I am trying to replace targeted with Targeted.
df['column_name'].replace("targeted","Targeted")
But nothing is happening, I still get the same value count.
df['column_name'].replace("targeted","Targeted").value_counts()?