Assuming that I have two dataframes:
# df1
+-----------------------+
| Name_1 |Age| Location |
+-----------------------+
| A | 18 | UK |
| B | 19 | US |
+-----------------------+
# df2
+-------------------------+
| Name_2 | Age | Location |
+-------------------------+
| A | 18 | US |
| B | 19 | US |
+-------------------------+
How can I compare all of the elements and get a dataframe with boolean values that indicate whether the corresponding values match?
The desired output would be:
# desired
+-----------------------+
| Name | Age | Location|
+-----------------------+
| A | True | False |
| B | True | True |
+-----------------------+