Can i use tabulate to implement a stream print table?
nickhuangxinyu opened this issue · comments
I want to print a table out, but it's dynamic increasing.
For example, I want to print a table which the main key is date.
+------------+---------+-------+------+------+----------+----------+---------+---------+---------+------+
| | PNL | IR | TVR | PSH | MAXDD | MDAYLOSS | PMEAN | PSTD | DDRATIO | DCNT |
+------------+---------+-------+------+------+----------+----------+---------+---------+---------+------+
| 2021-07-05 | 16415.8 | 0.24 | 88.5 | 3.66 | -17532.7 | -10515.8 | 4103.9 | 16773.6 | 1.07 | 4.0 |
| 2021-07-12 | 69376.1 | 1.42 | 87.0 | 2.6 | 938.4 | 938.4 | 17344.0 | 12235.7 | 0.01 | 4.0 |
| 2021-07-19 | -662.0 | -0.43 | 36.0 | 2.89 | -870.0 | -870.0 | -331.0 | 762.3 | 1.31 | 2.0 |
+------------+---------+-------+------+------+----------+----------+---------+---------+---------+------+
but the problem is, if the rows is too much, the first row-which represent the columns name will be disappear, Is there any method to make the first row show always, and let the following dynamic increasing print?
Can you provide a reproduceable sample of code for me to test?