MCPcopy Create free account
hub / github.com/dask/dask / index_summary

Function index_summary

dask/dataframe/utils.py:410–422  ·  view source on GitHub ↗

Summarized representation of an Index.

(idx, name=None)

Source from the content-addressed store, hash-verified

408
409
410def index_summary(idx, name=None):
411 """Summarized representation of an Index."""
412 n = len(idx)
413 if name is None:
414 name = idx.__class__.__name__
415 if n:
416 head = idx[0]
417 tail = idx[-1]
418 summary = f", {head} to {tail}"
419 else:
420 summary = ""
421
422 return f"{name}: {n} entries{summary}"
423
424
425###############################################################

Callers 1

infoMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected