zcollection.partitioning.date.Date#
- class zcollection.partitioning.date.Date(variables, resolution)[source]#
Bases:
PartitioningInitialize a partitioning scheme based on dates.
- Parameters:
variables (Sequence[str]) – A list of strings representing the variables to be used for partitioning.
resolution (str) – Time resolution of the partitioning. Must be in
RESOLUTION.
- Raises:
ValueError – If the resolution is not in the list of supported resolutions or if the partitioning is not performed on a one dimensional variable.
Example
>>> partitioning = Date(variables=("time", ), resolution="Y")
Attributes
The time resolution of the partitioning
The ID of the partitioning scheme
Variables to be used for the partitioning.
Public Methods
decode(values)Decode a partitioning scheme.
encode(partition)Encode a partitioning scheme.
join(partition_scheme, sep)Join a partitioning scheme.
Protected Methods
The time parts used for the partitioning
The indices of the time parts used for the partitioning
_keys()Return the keys of the partitioning scheme.
_partition(selection)Return the partitioning scheme for the given selection.
_split(variables)Return the partitioning scheme for the given variables.
_stringify(partition)Return a string representation of the partitioning scheme.
Inherited Methods
dtype()Return the data type of the partitioning scheme.
from_config(config)Create a partitioning scheme from a configuration.
Return the configuration of the partitioning scheme.
index_dataset(zds)Yield the indexing scheme for the given dataset.
list_partitions(fs, path)List the partitions.
parse(partition)Parse a partitioning scheme.
split_dataset(zds, axis)Split the dataset into partitions.