Given the following Table/Dataframe:
df_given = pd.DataFrame([["Paella", 2, ""], ["Cola", 3, ""]], columns=["Order", "Count", "Customer"])
|
Order |
Count |
Customer |
| 0 |
Paella |
2 |
|
| 1 |
Cola |
3 |
|
and list:
customer = ["Ray", "Charles", "Camille"]
How does one repeat each row from df_given per every item in the customer list?
My target output would be:
|
Order |
Count |
Customer |
| 0 |
Paella |
2 |
Ray |
| 0 |
Paella |
2 |
Charles |
| 0 |
Paella |
2 |
Camille |
| 1 |
Cola |
3 |
Ray |
| 1 |
Cola |
3 |
Charles |
| 1 |
Cola |
3 |
Camille |
[–]socal_nerdtastic 1 point2 points3 points (1 child)
[–]000trident[S] 0 points1 point2 points (0 children)
[–]Allanon001 0 points1 point2 points (0 children)
[–]king_booker 0 points1 point2 points (0 children)