0

I Have 2 Data Frames with unique values, one with unique ID and one with Unique Category. I want to expand each ID with each of the Categories in df2 column Category.

df1

| ID    | 
|:------|
| 1111  |
| 2222  |
| 3333  |

df2

| Category  |
|:----------|
| A         |
| B         |
| C         |

Wanted result:

| ID    | Category |
|:------|---------:|
| 1111  |A         |
| 1111  |B         |
| 1111  |C         |
| 2222  |A         |
| 2222  |B         |
| 2222  |C         |
| 3333  |A         |
| 3333  |B         |
| 3333  |C         |

How can I achieve that in an efficient way? Thank you in advance!

0 Answers0