I have a dataframe as follows:
| name | value |
|---|---|
| aa | 0 |
| aa | 0 |
| aa | 1 |
| aa | 0 |
| aa | 0 |
| bb | 0 |
| bb | 0 |
| bb | 1 |
| bb | 0 |
| bb | 0 |
| bb | 0 |
I want to delete all rows of the dataframe when there is 1 appeared in column 'value' with relation to 'name' column.
| name | value |
|---|---|
| aa | 0 |
| aa | 0 |
| aa | 1 |
| bb | 0 |
| bb | 0 |
| bb | 1 |
What is the best way to do so? I thought about pd.groupby method and use some conditions inside, but cannot understand how to make it work.