Using the following as a simple example in pandas:
dataframe
height animal
1 33 dog
2 22 cat
3 1000 elephant
4 35 dog
.
.
1000 45 dog
how can i select all dog strings and set them to 0?
iv tried:
df['name'][df['name'] == 'dog'] = 0
but unfortunately is did not work