Dropping rows that do not match values from another column

18 views Asked by At

I've got two dataframes that I am comparing however they are different in length. I want to compare the values from the reference column that exist in both dataframe and drop the rows that do not exist in both dataframes and then highlight the differences from the two dataframes in df3

I've tried using the .compare function but I am unable to due to the difference length. I've tried merging the dataframes together, from this I can find the differences but I can't figure out how to drop the values that do not exist in both. I have also tried the isin method but I am unsure how to split the dataframes to create a new dataframe based off the true/false values

0

There are 0 answers