I have a column, 'state', that has the values 'failed', 'successful', and two or three other values.
I am trying to create a dataframe with only the rows that contain 'failed' and 'successful' in the 'state' column.
I have implemented the following code:
df = df[df['state'].str.contains('failed' or 'successful', na = False)]
but I am only receiving 'failed' rows, not 'successful'.
Any suggestions? I have used this same format on other datasets with success