I have two data frames:
first one is this :
which has 3 columns (ID , Name, Salary)
and the seconed data frame is this:
which has 2 columns (ID , Name)
I want to groupby ID in the first data frame (def1) after that I want to check if this ID (isin) the other data frame (def2), if it's NOT then I want to remove it. noting that the last output I need it to be as data frame as well, which is this:
how can I do this?