I want to filter a dataframe using two different condition.
But I want to omit rows which doesn't satisfy the condition and only want to keep values which occur at least twice in column A
df1 = df[(df['A-B occurrence'] >= 3) & (df['A occurrence'] >= 2)]
Above is the code I am using and this is the output I get:
So as in column A, 17 is satisfying condition in one row only so I want to omit 17 all together as it is not meeting the condition, which means I only want to keep duplicate values which are present in column A 2 or more than 2 times


'A occurrence' >= 2)dfwas filtered out.