I have a pandas dataframe and need to clean Status column. My data looks like this:
id Status
123 100%
124 0%
125 1%
126 100%
127 0.25%
I want to exclude all the rows that are NOT 100% or 0%. The type of the column is object
I want my data looks like this:
id Status
123 100%
124 0%
126 100%
I have tried the following:
df = df.drop(df[(df.Status == '100%') & (df.Status == '0%')].index)
But that actually doesn't change the dataset at all.
Thank you!