ENH: Styler.apply_index and Styler.applymap_index for conditional formatting of column/index headers by attack68 · Pull Request #41893 · pandas-dev/pandas (original) (raw)

wouldn't apply_axis be more appropriate? e.g. don't see _header anywhere else in the codebase

do we need both (i get that we have symmetry, but is this overkill)?

i came up with 'header' becuase in the HTML that styler renders the index and column header cells are <th> (table header) elements, and these are the ones targeted by this method.

I'm not tied to the name but apply_axis feels a bit odd, since axis is already used by pandas for a common meaning and not really to do with impacting the values of the index or column headers.

apply_index(axis="columns") might be an alternative to make it clear that the function is being applied to either the index values or the column header values??