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

Method _create_nodes_and_group

pandas/io/pytables.py:1999–2018  ·  view source on GitHub ↗

Create nodes from key and return group name.

(self, key: str)

Source from the content-addressed store, hash-verified

1997 return group
1998
1999 def _create_nodes_and_group(self, key: str) -> Node:
2000 """Create nodes from key and return group name."""
2001 # assertion for mypy
2002 assert self._handle is not None
2003
2004 paths = key.split("/")
2005 # recursively create the groups
2006 path = "/"
2007 for p in paths:
2008 if not len(p):
2009 continue
2010 new_path = path
2011 if not path.endswith("/"):
2012 new_path += "/"
2013 new_path += p
2014 group = self.get_node(new_path)
2015 if group is None:
2016 group = self._handle.create_group(path, p)
2017 path = new_path
2018 return group
2019
2020
2021class TableIterator:

Callers 1

_identify_groupMethod · 0.95

Calls 3

get_nodeMethod · 0.95
splitMethod · 0.80
endswithMethod · 0.80

Tested by

no test coverage detected