I have a dataframe as follows (example is simplified):
id prediction1 prediction2
1234 Cocker_spaniel german_Shepard
5678 rhodesian_ridgeback australian_shepard
I need to remove the underscores and make sure the string is in lower case so I can search it easier later.
I am not quite sure how to loop through this. My initial student thought is something like what follows:
for row in image_predictions['p1']:
image_predictions['p1'] = image_predictions['p1'].replace('_', ' ')
The above code is for replacing the underscore with a space and I believe the code would be similar for lowercase using the .lower() method.
Any advice to point me in the right direction?