As titled,I have a dataframe that looks like this:
Date Asset_name trade_price
2022-08-01 Asset 1 96
2022-08-01 Asset 2 94
2022-08-01 Asset 3 99
2022-08-01 Asset 4 98
2022-08-01 Asset 5 91
2022-08-02 Asset 1 ...
....
I want a dataframe like this:
Date Asset 1 Asset 2 Asset 3 Asset 4 Asset 5
2022-08-01 96 94 99 98 91
2022-08-02 ...
I'm confused on whether it should be done using transpose or melt. Any help will be appreciated!