cf.Field.item

Field.item(item=None, key=False, **kwargs)[source]

Return a domain, or its domain identifier, from the field.

An item is either a dimension coordinate, an auxiliary coordinate, a cell measure or a transform object.

The item may be selected with the keyword arguments. When multiple criteria are given, the item will be the intersection of the selections. If no unique item can be found then None is returned.

A returned item is not a copy, so in-place changes to it are stored in the domain.

Parameters :
item, kwargs : optional

Select the unique item (it it exists) which would be selected by this call of the field’s items method: f.items(item, **kwargs). See cf.Field.items for details.

key : bool, optional

If True then return the domain’s identifier for the item, rather than the item itself.

Returns :
out :

The unique item or its domain identifier or, if there isn’t a unique item, None.

Examples

Previous topic

cf.Field.insert_transform

Next topic

cf.Field.item_axes

This Page