I want to drop duplicates with same ID that not have a specific value in other column (in this case filter by those rows that have same ID and value = 1) Input df:
+---+-----+------+
| id|value|sorted|
+---+-----+------+
|  3|    0|     2|
|  3|    1|     3|
|  4|    0|     6|
|  4|    1|     5|
|  5|    4|     6|
+---+-----+------+
Result I want:
+---+-----+------+
| id|value|sorted|
+---+-----+------+
|  3|    1|     3|
|  4|    1|     5|
|  5|    4|     6|
+---+-----+------+
 
    