I have a dataframe with large number of columns but single row as df1
:
Col1 Col2 Price Qty
A B 16 5
I have another dataframe as follows, df2
:
Price Qty
8 2.5
16 5
6 1.5
I want to achieve the following:
Col1 Col2 Price Qty
A B 8 2.5
A B 16 5
A B 6 1.5
Where essentially I am taking all rows of df1
and repeat it while concatenating with df2
but bring the Price
and Qty
columns from df2
and replace the ones present originally in df1
.
I am not sure how to proceed with above.