Open sylvaincom opened 1 week ago
Other dataframe libraries like polars don't automatically have index columns (for example, polars has a with_row_index
method) to add a column at the beginning which looks like an index column.
You can achieve a similar effect for pandas with pandas.DataFrame.reset_index()
.
Because we eventually intend to support other kinds of DataFrames, I don't think we should make Pandas a special case, although we could at least mention the reset_index
trick in our docs.
Isn't it convenient to display the row index at all times?
This issue boils down to detecting if a DataFrame has an index, and transmitting this index to the frontend.
I am very familiar with pandas
, and less with polars
, but in the case of the skore
UI for dashboard, I think that it would be best to display the row index by default. Indeed, in our UI, when you have a lot of rows, you must click to the right (and left) to visualize the next pack of 10 rows, making you loose sight of which row index you are at. This is not a strong opinion, and I am ok with how things currently are.
Yeah, it's a problem indeed. We could at least send the index over as a column when we find it.
When displaying pandas data frames on the dashboard, I would like to have the row index (same as the column index that already appears):