cf.Index.set_data¶
-
Index.
set_data
(data, copy=True)[source]¶ Set the data.
The units, calendar and fill value of the incoming
Data
instance are removed prior to insertion.New in version 3.0.0.
Parameters: Returns: Examples:
>>> d = Data(range(10)) >>> f.set_data(d) >>> f.has_data() True >>> f.get_data() <Data(10): [0, ..., 9]> >>> f.del_data() <Data(10): [0, ..., 9]> >>> f.has_data() False >>> print(f.get_data(None)) None >>> print(f.del_data(None)) None