nctoolkit.DataSet.assign
nctoolkit.DataSet.assign#
- DataSet.assign(self, drop=False, \*\*kwargs)#
Create new variables Existing columns that are re-assigned will be overwritten.
- Parameters
drop (bool) –
Set to True if you want existing variables to be removed once the new ones have been created. Defaults to False.
should evaluate to a numeric. New variables are calculated for each grid cell and time step.
**kwargs (dict of {str: callable}) – New variable names are keywords. All terms in the equation given by the lamda function should evaluate to a numeric. New variables are calculated for each grid cell and time step.
Notes
Operations are carried out in the order give. So if a new variable is created in the first argument, it can then be used in following arguments.