cf.FieldList.asdatetime

FieldList.asdatetime(i=False)[source]

For each field, convert the internal representation of data array elements to date-time objects.

Only applicable to field lists with reference time units.

If the calendar has not been set then the CF default calendar will be used and the units will be updated accordingly.

See also

asreftime

Examples 1:
>>> g = f.asdatetime()
Parameters:
i: bool, optional

If True then update the field list in place. By default a new field list is created. In either case, a field list is returned.

Returns:

out: cf.FieldList

Examples 2:
>>> t.asreftime().dtype
dtype('float64')
>>> t.asdatetime().dtype
dtype('O')