I would like to compare 2 columns in different dataframes, then delete entire non-matching rows.
The 2 columns are not of the same length.
Here is a mock-up of DataFrame #1:
Here is a mock-up of DataFrame #2:
I would like to compare the ID_NUMBER
columns in the 2 DataFrames, then delete entire rows in DataFrame #1 if the row value cannot be found in DataFrame #2.
Currently, my code is not working:
DataFrame1 = np.where((DataFrame1["ID_NUMBER"] == DataFrame2["ID_NUMBER"]))
Many thanks in advance!