I have a dataset, df, where I wish to remove the rows from if the column contains a certain value(s)
value pod
1 hi
2 ok
3 no
4 sure
Desired output:
value pod
2 ok
4 sure
I wish to remove the row if the pod column contains the word 'hi' or the word 'no'
This is what I am doing
df1 = df.drop(df.index[df['pod'] == 'hi', 'no'], inplace = True)
I keep getting this error:
A value is trying to be set on a copy of a slice from a DataFrame
I am still researching this, any suggestion is appreciated