larch.DataTree.add_dataset
larch.DataTree.add_dataset¶
- DataTree.add_dataset(name, dataset, relationships=(), as_root=False)[source]¶
Add a new Dataset node to this DataTree.
- Parameters
name (str) –
dataset (Dataset or pandas.DataFrame) – Will be coerced into a Dataset object if it is not already in that format, using a no-copy process if possible.
relationships (Tuple[str or Relationship]) – Also add these relationships.
as_root (bool, default False) – Set this new node as the root of the tree, displacing any existing root.