larch.DataTree.add_relationship

larch.DataTree.add_relationship

DataTree.add_relationship(*args, **kwargs)[source]

Add a relationship to this DataTree.

The new relationship will point from a variable in one dataset to a dimension of another dataset in this tree. Both the parent and the child datasets should already have been added.

Parameters
  • *args – All arguments are passed through to the Relationship contructor, unless only a single str argument is provided, in which case the Relationship.from_string class constructor is used.

  • **kwargs – All arguments are passed through to the Relationship contructor, unless only a single str argument is provided, in which case the Relationship.from_string class constructor is used.