Skip to content

Commit 9b90f8b

Browse files
committed
implement option 2: list-like presentation of the indexes
1 parent e29aeb9 commit 9b90f8b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

xarray/core/formatting.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ def summarize_index(
425425
if max_width is None:
426426
max_width = OPTIONS["display_width"]
427427

428-
preformatted = [pretty_print(f" {name} ", col_width) for name in names]
428+
preformatted = [
429+
pretty_print(f" {'-' if index == 0 else ' '} {name} ", col_width)
430+
for index, name in enumerate(names)
431+
]
429432

430433
head, *tail = preformatted
431434
index_width = max_width - len(head)

0 commit comments

Comments
 (0)