Skip to content

Commit a90eba7

Browse files
committed
document changes to cline options
1 parent c3b4a54 commit a90eba7

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Other enhancements
6262
- Support passing a :class:`Iterable[Hashable]` input to :meth:`DataFrame.drop_duplicates` (:issue:`59237`)
6363
- Support reading Stata 102-format (Stata 1) dta files (:issue:`58978`)
6464
- Support reading Stata 110-format (Stata 7) dta files (:issue:`47176`)
65+
- :meth:`Styler.to_latex` accepts additional options to the ``clines`` parameter, allowing lines to be drawn between hidden index levels.
6566

6667
.. ---------------------------------------------------------------------------
6768
.. _whatsnew_300.notable_bug_fixes:

pandas/io/formats/style.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,15 +716,25 @@ def to_latex(
716716
Possible values are:
717717
718718
- `None`: no cline commands are added (default).
719-
- `"all;data"`: a cline is added for every index value extending the
720-
width of the table, including data entries.
719+
- `"all;data"`: a cline is added for every visible index value extending
720+
the width of the table, including data entries.
721721
- `"all;index"`: as above with lines extending only the width of the
722722
index entries.
723-
- `"skip-last;data"`: a cline is added for each index value except the
724-
last level (which is never sparsified), extending the widtn of the
723+
- `"all-invisible;data"`: a cline is added for every index value,
724+
including hidden indexes, extending the full width of the table,
725+
including data entries.
726+
- `"all-invisible;index"`: as above with lines extending only the width
727+
of the index entries.
728+
- `"skip-last;data"`: a cline is added for each visible index value except
729+
the last level (which is never sparsified), extending the widtn of the
725730
table.
726731
- `"skip-last;index"`: as above with lines extending only the width of the
727732
index entries.
733+
- `"skip-last-invisible;data"`: a cline is added for each index value,
734+
including hidden index levels, but excluding the last (which is never
735+
sparsified), extending the width of the table.
736+
- `"skip-last-invisible;index"`: as above with lines extending only the
737+
width of the index entries.
728738
729739
.. versionadded:: 1.4.0
730740
label : str, optional

0 commit comments

Comments
 (0)