s-leroux / fin

Set of tools for personal investment
MIT License
1 stars 0 forks source link

Use the index as an indirection table toward to actual data rows. #19

Open s-leroux opened 7 months ago

s-leroux commented 7 months ago

https://github.com/s-leroux/fin/blob/9016342d5345237b1c21bc585bd61ce3577d20f3/fin/seq2/serie.pxd#L7

It is confusing the have the index as a column separated from the data columns.

A different approach would be to handle the index data as an ordinary column but use the index itself as an indirection to retrieve the rows in a given order. The extra level of indirection should be negligible for the C/Cython code. For Python code, this will require an extra level of __getitem__.