I have a df that looks like this:
Account 1 Pre 9
Account 1 Pre 9
Account 1 During 5
Account 1 Post 5
Account 1 Post 5
Account 2 Pre 11
Account 2 During 9
Account 2 Post 7
Account 2 Post 7
Account 2 Post 7
Account 2 Post 7
Account 3 Pre 1
Account 3 During 2
Account 3 During 2
Account 3 Post 3
I am trying to drop all rows for each account if Pre, During, and Post are all less than 10. So in the example above we would lose all of the Account 1 rows and all of the Account 3 rows but keep all Account 2 rows because there in a single row that has 11.
I'm relatively new to pandas and python but I'm thinking something following the logic below might work:
for each Account in Account:
if 'Pre' > 10 AND 'During' > 10 AND 'Post' > 10
return (df_updated)
This df_updated should be composed of only the Account 2 I believe. I don't think I can just take the results of this for loop though and return a new df directly though so I am not quite sure how to do this.
Thank you for any help you can provide!