0

I have a dataframe called subjects_to_exclude which looks something like this:

    STUDY_ID
0   3
1   7
2   12
3   25
4   29

and another dataframe cleaned_bp:

    STUDY_ID    SBP     DBP     VISITCODE
0   1          145.0    91.0    1
1   2          139.0    92.0    2
2   3          141.0    88.0    3
3   4          135.0    92.0    6

And I want to remove the rows which have STUDY_ID values that are in subjects_to_exclude. Should I iterate through the all cleaned_bp multiple times and find a match in STUDY_ID values? (which would be an insufficient way to solve it) Is there a better solution?

braaterAfrikaaner
  • 1,072
  • 10
  • 20
Huzo
  • 1,652
  • 1
  • 21
  • 52

0 Answers0