We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 876607c commit 7af0b29Copy full SHA for 7af0b29
xarray/core/formatting.py
@@ -425,8 +425,18 @@ def summarize_index(
425
if max_width is None:
426
max_width = OPTIONS["display_width"]
427
428
+ def prefix(index, length):
429
+ if index == 0 and length == 1:
430
+ return " "
431
+ elif index == 0:
432
+ return "┌"
433
+ elif index >= length - 1:
434
+ return "└"
435
+ else:
436
+ return "│"
437
+
438
preformatted = [
- pretty_print(f" {'-' if index == 0 else ' '} {name} ", col_width)
439
+ pretty_print(f" {prefix(index, len(names))} {name} ", col_width)
440
for index, name in enumerate(names)
441
]
442
0 commit comments