In pandas dataframe first I want to group the data with 'batch_id
' column then check in the 'result
' column if all values are negative delete that group
Using follwoing code
df.groupby('batch_id').filter(lambda g: (g.result != 'negative').all())