I have a dataframe with columns: ["stock", "time", "price", "volume"]).
For 1-d analysis, with price alone, I use pd.pivot() to make time run horizontally and stocks vertically. With price as the value. I then take the numpy array.
How do I prepare the data when my time series now has ["price", "volume"] as the value?
My goal is to cluster stocks.
I have a dataframe with columns: ["stock", "time", "price", "volume"]).
For 1-d analysis, with price alone, I use pd.pivot() to make time run horizontally and stocks vertically. With price as the value. I then take the numpy array.
How do I prepare the data when my time series now has ["price", "volume"] as the value?
Thank you!