I have a dataframe and I would like to filter it by multiple values within a single column, how can I accomplish this? when I filter by a singular value I usually use df_filtered = df[df['column'] == value]
, but that isn't working for the 61 values at least as I've tried it. Thank you.
MRN ... Result
0 13556832 ... 400.0
1 13556832 ... 400.0
2 13556832 ... 400.0
3 13556832 ... 392.0
4 13556832 ... 400.0
here is a sample of the dataframe (there are about 100k rows, and I need to filter for the 61 MRN values that I have identified for a project. So ultimately I would like to have a separate df that includes all MRN values that I have identified as important.
I am essentially looking for a solution that is similar to the .isin() operator except for 61 values, not 2 max