Skip to content

Commit 492ab47

Browse files
committed
implement option 4: light box components after the coord names
1 parent 2cec070 commit 492ab47

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xarray/core/formatting.py

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

428-
def prefix(index, length):
428+
def suffix(index, length):
429429
if index == 0 and length == 1:
430430
return " "
431431
elif index == 0:
432-
return ""
432+
return ""
433433
elif index >= length - 1:
434-
return ""
434+
return ""
435435
else:
436436
return "│"
437437

438438
preformatted = [
439-
pretty_print(f" {prefix(index, len(names))} {name} ", col_width)
439+
pretty_print(f" {name} ", col_width) + suffix(index, len(names)) + " "
440440
for index, name in enumerate(names)
441441
]
442442

0 commit comments

Comments
 (0)