I have two dataframes as per below:
df1 = [['tom', 10],['nick',15], ['juli',14]]
df2= [['juli', 14],['daniel',15], ['tom',10], ['tom',10]]
Please note that the dataframes might not have the same index order, but I would like to receive the differences between them as an output.
So I would expect the output to be:
['nick',15]
['daniel',15]
['tom',10]
If possible, I would like to know which data frame contains each value. In the example provided above, the first item (['nick',15]
) belongs to df1
and the others to df2
.
Bonus: Is there a way to export the output to Excel?