cf.Constructs.filter_by_data¶
- Constructs.filter_by_data(todict=False, cached=None)[source]¶
Selects metadata constructs that could contain data.
Selection is not based on whether they actually have data, rather by whether the construct supports the inclusion of data. For example, constructs selected by this method will all have a
get_datamethod.Added in version (cfdm): 1.7.0
See also
filter,filters_applied,inverse_filter,clear_filters_applied,unfilter- Parameters:
- todict:
bool, optional If True then return a dictionary of constructs keyed by their construct identifiers, instead of a
Constructsobject. This is a faster option.Added in version (cfdm): 1.8.9.0
- cached: optional
If any value other than
Nonethen return cached without selecting any constructs.Added in version (cfdm): 1.8.9.0
- todict:
- Returns:
Constructsordictor cachedThe selected constructs, or a cached valued.
Examples
Select constructs that could contain data:
>>> d = c.filter_by_data()