Looking to join two tables together (tables 1 and 2) to look like table 3. I tried using pandas join on the dataframes, but I keep getting errors for trying to join on columns with repeated values.
Ex:
Table 1
| ID | A | B |
|---|---|---|
| 1 | A1 | B1 |
| 2 | A1 | B1 |
| 2 | A2 | B2 |
Table 2
| ID | Property |
|---|---|
| 1 | Property 1 |
| 1 | Property 2 |
| 2 | Property 1 |
| 2 | Property 2 |
| 2 | Property 3 |
Table 3 (expected output)
| ID | A | B | Property |
|---|---|---|---|
| 1 | A1 | B1 | Property 1 |
| 1 | A1 | B1 | Property 2 |
| 2 | A1 | B1 | Property 1 |
| 2 | A1 | B1 | Property 2 |
| 2 | A1 | B1 | Property 3 |
| 2 | A2 | B2 | Property 1 |
| 2 | A2 | B2 | Property 2 |
| 2 | A2 | B2 | Property 3 |
| 2 | A3 | B3 | Property 1 |
| 2 | A3 | B3 | Property 2 |
| 2 | A3 | B3 | Property 3 |