schema

schema

schema(row_spec, *, order_columns=True, missing_columns='error', extra_columns='drop', validate=True)[source]

Creates a dataframe schema from a row specification dataclass

For detailed description of the keyword arguments, look up the Schema attributes documentation.

Parameters

row_spec (Type[TypeVar(_RowSpec)]) – Data class specifying a dataframe row

Keyword Arguments
  • order_columns – Whether to order the dataframe columns as in the specification

  • missing_columns – What to do with missing columns

  • extra_columns – What to do with extra columns

  • validate – Whether to perform validation

Return type

Schema[TypeVar(_RowSpec)]

Returns

A dataframe schema