(ds)
| 365 | |
| 366 | |
| 367 | def 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 | |
| 396 | inherited_coord_section = partial( |
nothing calls this directly
no test coverage detected
searching dependent graphs…