pandera.api.xarray.components.CoordinateΒΆ

class pandera.api.xarray.components.Coordinate(dtype=None, dims=None, dimension=None, required=True, checks=None, parsers=None, nullable=False, coerce=False, indexed=None, name=None, strict_coords=False, strict_attrs=False, title=None, description=None, metadata=None)[source]ΒΆ

Specification for one entry in DataArraySchema(coords=...).

Coordinates are validated like small DataArraySchema instances (dtype, nullability, checks, parsers).

ParametersΒΆ

dtype

Expected value dtype (via the xarray dtype engine).

dims

Expected dimension names of the coordinate variable.

dimension

If True, the coordinate is a dimension coordinate (indexes its dim).

required

If True (default), the coordinate must exist. If False, the coordinate is optional; when present all other constraints apply.

indexed

If True, coordinate values must match the dimension index (see backend).

checks, parsers

Applied to the coordinate DataArray.

nullable, coerce

Same meaning as on DataArraySchema.

strict_coords, strict_attrs

Passed through when materializing a DataArraySchema.

name, title, description, metadata

Documentation / identification metadata.

Methods

__init__(dtype=None, dims=None, dimension=None, required=True, checks=None, parsers=None, nullable=False, coerce=False, indexed=None, name=None, strict_coords=False, strict_attrs=False, title=None, description=None, metadata=None)[source]ΒΆ
to_data_array_schema(coord_name)[source]ΒΆ

Materialize as a DataArraySchema for the coordinate.

Return type:

DataArraySchema