I have two data frames which represent data pulled from two different pedometers that record how many miles a given person ran for a specific month.
I want to calculate the difference in "Miles Run" for rows in DF 1 and DF 2 which have the same "Month of Year" and "Person". For example, DF 1 and DF 2 have the miles Joe ran in January and the miles Bob ran in February. For both of these common rows, I want to calculate how different "Miles Run" is for both.
Any idea how to pull out rows from two DF's that have 2 matching column values?
DF 1:
Month of Year Miles Run Person
January 6.7458 Joe
February 1.3808 Bob
March 11.2689 Jill
April 9.8917 Sarah
DF 2:
Month of Year Miles Run Person
November 5.5234 Andrew
December 7.4523 Kyle
January 9.1189 Joe
February 7.4343 Bob