0

What i need:

Date A Stock B Stock
2020-10-10 100 50
2020-10-11 150 100
2020-10-12 200 250
2020-10-13 450 150

What i have:

Date Stock Price
2020-10-10 A Stock 100
2020-10-11 A Stock 150
2020-10-12 A Stock 200
2020-10-13 A Stock 450
2020-10-10 B Stock 50
2020-10-11 B Stock 100
2020-10-12 B Stock 250
2020-10-13 B Stock 150

Basically I need to create column from Groups inside one column and fill their values with corresponding values from the Third column.

Only thing i know related to groups is groupby but, i am not sure how this will work, and i see where this is coming from, considering the groupby involves aggretgating operation like sum, which is not the case needed here

0 Answers0