I am a newbie to pandas so please forgive the newbie question!
I have the following code;
import pandas as pd
pet_names = ["Name","Species"
"Jack","Cat"
"Jill","Dog"
"Tom","Cat"
"Harry","Dog"
"Hannah","Dog"]
df = pd.DataFrame(pet_names)
df = df[df['Species']!='Cat']
print(df)
I would like to remove all the rows that contain "Cat" in the "Species" column, leaving all the dogs behind. How do I do this? Unfortunately, this code is currently returning errors.