I have the following orderbook data in a pandas dataframe:
quantity tradeType
costPerShareYes
0.59 252 SELL NO (0)
0.58 261 SELL NO (0)
0.57 230 SELL NO (0)
0.56 300 SELL NO (0)
0.55 623 SELL NO (0)
0.54 226 SELL NO (0)
0.53 117 SELL NO (0)
0.52 623 SELL NO (0)
0.51 2411 SELL NO (0)
0.50 5257 SELL NO (0)
0.49 3521 SELL YES (1)
0.48 2590 SELL YES (1)
0.47 4898 SELL YES (1)
0.46 2245 SELL YES (1)
0.45 934 SELL YES (1)
0.44 1088 SELL YES (1)
0.43 1111 SELL YES (1)
0.42 1905 SELL YES (1)
0.41 326 SELL YES (1)
0.40 288 SELL YES (1)
I also have a timeRetrieved column, which indicates the time this group of data was retrieved.
I want to display this in a table like this:
My questions are:
-
What is the best way to transform this data so that there is a column for each tradeType value?, or is it better to just create two dataframes side by side with Sell Yes/Sell No options?
-
Is it better to display this using a DataTable or a basic table?
-
I want to be able to view this as a timeseries object, so I can move a slider back and say “what did the orderbook look like yesterday? two days ago? etc…” I didn’t see an example that shows a table being updated by a slider in the examples, but I don’t see any reason it can’t be done… Is it possible to do this?