a study of pandas dataframes with different levels¤
the goal of this work is to study how index and column names are presented in html tables.
start with a dataframe with multi indexes.
each level of the study removes indexes rather than add.
we can think about 4 quadrants in the dataframe representation:
the region where the names of the indexes are presented
the region where the column values are shown
the region where the index values are shown
the region where the values are shown
there are natural solutions when either row or columns are provided.
the names are column or row scoped headers for the primary axis of the table.
a table with column names is column major while row names are row major.
there are ambiguities about the major axis when both the indexes are named,
this poses specific challenges to region 1 our table representation,
it is likely that under these conditions we will have empty cells.
we'll need principles that help us choose the best conformation under ambiguous conditions.
if empty cells are presented, should they bed in thead? tbody?
is there an advantage to empty columns vs empty rows.
again this only matters in the single axis use case.
importpandas,midgy
/tmp/ipykernel_21646/3616882755.py:1: DeprecationWarning:
Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0),
(to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries)
but was not found to be installed on your system.
If this would cause problems for you,
please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466
import pandas, midgy