I am working with a pandas dataframe. I would like to change the name in a column if it DOES NOT equal "false" to the word "NAMED".
df
hash
0 false
1 false
2 asldkjfl645sd54
3 false
4 65s4d65a3s21d12
5 2s1d53a54d5f1a3
Desired output:
df
hash
0 false
1 false
2 NAMED
3 false
4 NAMED
5 NAMED
df['hash'].where(df['hash'].eq('false'), 'NAMED')