cf.VariableList.delprop

VariableList.delprop(prop)[source]

Delete a CF property from each element of the list.

Parameters :
prop : str

The name of the property to delete.

Returns :

None

Examples

>>> len(fl)
2
>>> fl.getprop('foo')
['bar', 'bar']
>>> fl.delprop('foo')
>>> fl.getprop('foo', 5)
[5, 5]

Note that recognised CF propeties (such as ‘long_name’) may be deleted directly:

>>> del fl.standard_name
>>> getattr(fl, 'standard_name', None)
[None, None]

Previous topic

cf.VariableList.count

Next topic

cf.VariableList.dump

This Page