zcollection.collection.Collection.load#

Collection.load(*, filters=None, indexer=None, selected_variables=None)[source]#

Load the selected partitions.

Parameters
Returns

The dataset containing the selected partitions.

Return type

Optional[Dataset]

Warning

If you select variables to load from the collection, do not insert the returned dataset otherwise all skipped variables will be reset with fill values.

Example

>>> collection = ...
>>> collection.load(
...     filters="year=2019 and month=3 and day % 2 == 0")
>>> collection.load(
...     filters=lambda keys: keys["year"] == 2019 and
...     keys["month"] == 3 and keys["day"] % 2 == 0)