Reputation: 23
I would like to insert the same information beside every row using pandas. For example, I have a dataframe with columns: Name, Age. and another datafreme with only one column: COLOR, and i would like to combine both as below:
Upvotes: 2
Views: 1256
Reputation: 24251
You want the Cartesian product of the data frames. Use
df1.merge(df2, how='cross')
Upvotes: 3