MCPcopy
hub / github.com/pydata/xarray / dataset_repr

Function dataset_repr

xarray/core/formatting_html.py:367–393  ·  view source on GitHub ↗
(ds)

Source from the content-addressed store, hash-verified

365
366
367def dataset_repr(ds) -> str:
368 obj_type = f"xarray.{type(ds).__name__}"
369
370 header_components = [f"<div class='xr-obj-type'>{escape(obj_type)}</div>"]
371
372 sections = []
373
374 sections.append(dim_section(ds))
375
376 if ds.coords:
377 sections.append(coord_section(ds.coords))
378
379 sections.append(datavar_section(ds.data_vars))
380
381 display_default_indexes = _get_boolean_with_default(
382 "display_default_indexes", False
383 )
384 xindexes = filter_nondefault_indexes(
385 _get_indexes_dict(ds.xindexes), not display_default_indexes
386 )
387 if xindexes:
388 sections.append(index_section(xindexes))
389
390 if ds.attrs:
391 sections.append(attr_section(ds.attrs))
392
393 return _obj_repr(ds, header_components, sections)
394
395
396inherited_coord_section = partial(

Callers

nothing calls this directly

Calls 6

typeFunction · 0.85
dim_sectionFunction · 0.85
_obj_reprFunction · 0.85
_get_indexes_dictFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…