I am new to python and pandas. I want to create all combinations from two dataframe such as follows, where I will have all values for each Name and date combinations... anyone please could help?
I need a dataframe such that for each Name and date(Unique Key) in first dataframe will have all the values mentioned in second dataframe for that particular matching date.
first_df =
| date | Name | ExtraCol
| 01/01 | AB | abc
| 01/01 | CD | def
| 01/02 | AB | xyz
second_df =
| date | value
| 01/01 | 1
| 01/01 | 2
| 01/01 | 3
| 01/01 | 4
| 01/02 | 1
| 01/02 | 2
expected_df =
| date | Name | Value | ExtraCol
| 01/01| AB | 1 | abc
| 01/01| AB | 2 | abc
| 01/01| AB | 3 | abc
| 01/01| AB | 4 | abc
| 01/01| CD | 1 | def
| 01/01| CD | 2 | def
| 01/01| CD | 3 | def
| 01/01| CD | 4 | def
| 01/02| AB | 1 | xyz
| 01/02| AB | 2 | xyz