cf.FieldList¶
-
class
cf.
FieldList
(fields=None)[source]¶ Bases:
cf.mixin.fielddomainlist.FieldDomainList
,cf.constructlist.ConstructList
An ordered sequence of field constructs.
A field list supports the python list-like operations (such as indexing and methods like
append
). These methods provide functionality similar to that of a built-in list. The main difference is that when a field construct element needs to be assessed for equality itsequals
method is used, rather than the==
operator.Initialisation
- Parameters
- fields: (sequence of)
Field
, optional Create a new list with these field constructs.
- fields: (sequence of)
Selecting¶
Select elements by their metadata constructs. |
|
Select list elements constructs by identity. |
|
Select field constructs by property. |
|
Select list elements by netCDF variable name. |
|
Select list elements by property. |
|
Select list elements by the number of domain axis constructs. |
|
Select field constructs by units. |
|
Alias of |
|
Select a unique field construct by its identity. |
|
Alias for |
Comparison¶
Whether two lists are the same. |
Miscellaneous¶
Close all files referenced by each construct in the list. |
|
Join the sequence of fields within the field list together. |
|
Return a deep copy. |
Aliases¶
Alias of |
|
Alias for |
List-like operations¶
These methods provide functionality identical to that of a Python
list
, with one exception:
When a field construct element needs to be assessed for equality, its
equals
method is used, rather than the==
operator. This affects thecount
,index
,remove
,__contains__
,__eq__
and__ne__
methods.
For example
>>> fl.count(x)
is equivalent to
>>> sum(f.equals(x) for f in fl)
Append object to the end of the list. |
|
Remove all items from list. |
|
Return number of occurrences of value. |
|
Extend list by appending elements from the iterable. |
|
Return first index of value. |
|
Insert object before index. |
|
Remove and return item at index (default last). |
|
Remove first occurrence of value. |
|
Reverse IN PLACE. |
|
Sort of the list in place. |
|
The binary arithmetic operation |
|
Called to implement membership test operators. |
|
The rich comparison operator |
|
Return self>=value. |
|
Called to implement evaluation of f[index] |
|
Called to implement evaluation of f[i:j] |
|
Return self>value. |
|
Implement iter(self). |
|
Implement self+=value. |
|
Implement self*=value. |
|
Return self<=value. |
|
Return len(self). |
|
Return self<value. |
|
The binary arithmetic operation |
|
The rich comparison operator |
|
Called by the |
|
Return value*self. |
|
Set self[key] to value. |
|
Called by the |
Special methods¶
Alias for |
|
Called by the |
Deprecated¶
Methods
Deprecated at version 3.0.0. |
|
Deprecated at version 3.0.0. |