setUnits()
Signature:
set_unit(
value: Union[pint.registry.Unit, str],
in_place: bool = False
) -> TimeSeries
The hec-python-library equivalent of Jython method setUnits():
If in_place=True, the instance itself
is modified. In this case the returned value (which can be ignored in python) is the modified instance, which can be used in chaining
methods.
Notes:
The direct equivalent requires using
in_place=Trueoriset_unit().Setting the unit does not convert the values to the specified unit. For that functionality use the
to()orito()method.
Example:
ts2 = ts1.set_unit("cfs")
Signature:
iset_unit(
value: Union[pint.registry.Unit, str],
in_place: bool = False
) -> TimeSeries
Convenience method for callint set_unit(...) with in_place=True.
Example:
ts1.iset_unit("cfs")