pandera.schemas.SeriesSchema

class pandera.schemas.SeriesSchema(dtype=None, checks=None, index=None, nullable=False, unique=False, allow_duplicates=None, coerce=False, name=None, pandas_dtype=None, title=None, description=None)[source]

Series validator.

Initialize series schema base object.

Parameters

Warning

This option will be deprecated in 0.8.0. Use the unique argument instead.

Parameters
  • coerce (bool) – If True, when schema.validate is called the column will be coerced into the specified dtype. This has no effect on columns where pandas_dtype=None.

  • name (Optional[str]) – series name.

  • pandas_dtype (Union[str, type, DataType, ExtensionDtype, dtype, None]) – alias of dtype for backwards compatibility.

  • title (Optional[str]) – A human-readable label for the series.

  • description (Optional[str]) –

    An arbitrary textual description of the series.

    Warning

    This option will be deprecated in 0.8.0

Attributes

allow_duplicates

Whether to allow duplicate values.

checks

Return list of checks or hypotheses.

coerce

Whether to coerce series to specified type.

description

An arbitrary textual description of the series.

dtype

Get the pandas dtype

name

Get SeriesSchema name.

nullable

Whether the series is nullable.

title

A human-readable label for the series.

unique

Whether to check for duplicates in check object

Methods

__init__

Initialize series schema base object.

validate

Validate a Series object.

__call__

Alias for SeriesSchema.validate() method.