MCPcopy
hub / github.com/pandas-dev/pandas / groups

Method groups

pandas/io/pytables.py:1555–1596  ·  view source on GitHub ↗

Return a list of all the top-level nodes. Each node returned is not a pandas storage object. Returns ------- list List of objects. See Also -------- HDFStore.get_node : Returns the node with the key. Examples

(self)

Source from the content-addressed store, hash-verified

1553 s.create_index(columns=columns, optlevel=optlevel, kind=kind)
1554
1555 def groups(self) -> list:
1556 """
1557 Return a list of all the top-level nodes.
1558
1559 Each node returned is not a pandas storage object.
1560
1561 Returns
1562 -------
1563 list
1564 List of objects.
1565
1566 See Also
1567 --------
1568 HDFStore.get_node : Returns the node with the key.
1569
1570 Examples
1571 --------
1572 >>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"])
1573 >>> store = pd.HDFStore("store.h5", "w") # doctest: +SKIP
1574 >>> store.put("data", df) # doctest: +SKIP
1575 >>> print(store.groups()) # doctest: +SKIP
1576 >>> store.close() # doctest: +SKIP
1577 [/data (Group) ''
1578 children := ['axis0' (Array), 'axis1' (Array), 'block0_values' (Array),
1579 'block0_items' (Array)]]
1580 """
1581 _tables()
1582 self._check_if_open()
1583 assert self._handle is not None # for mypy
1584 assert _table_mod is not None # for mypy
1585 return [
1586 g
1587 for g in self._handle.walk_groups()
1588 if (
1589 not isinstance(g, _table_mod.link.Link)
1590 and (
1591 getattr(g._v_attrs, "pandas_type", None)
1592 or getattr(g, "table", None)
1593 or (isinstance(g, _table_mod.table.Table) and g._v_name != "table")
1594 )
1595 )
1596 ]
1597
1598 def walk(self, where: str = "/") -> Iterator[tuple[str, list[str], list[str]]]:
1599 """

Callers 8

read_hdfFunction · 0.95
__len__Method · 0.95
keysMethod · 0.95
itemsMethod · 0.95
_maybe_adjust_nameFunction · 0.45
size_to_ptMethod · 0.45
create_blockFunction · 0.45
getndotsMethod · 0.45

Calls 2

_check_if_openMethod · 0.95
_tablesFunction · 0.85

Tested by 2

create_blockFunction · 0.36
getndotsMethod · 0.36