I have df below:
id | status | id_reference
1 True NaN
4 False 1
2 False Nan
7 False 3
6 True 2
10 True 4
How can I only filter or want the rows in the df, where:
the status column is True and the id_reference column value exists in another row in the df as a value in the id column as a value.
So based on above df,
I would want rows below:
id | status | id_reference
6 True 2
10 True 4
actual df is much larger as this is a sample