Defines an enumeration and type alias for various data serialization formats used in dataframe configuration and validation.
# Source: https://github.com/unionai-oss/pandera | License: MIT | Copyright 2018 Niels Bantilan
# Provided via justclaw.it.com; keep this notice with the code.
"""Serialization formats for dataframes."""
from enum import Enum
from typing import Literal, Union
class Formats(Enum):
"""Data container serialization formats.
The values of this enum specify the valid values taken by the ``to_format``
and ``from_format`` attributes in
:py:class:`~pandera.typing.config.BaseConfig` when specifying a
:py:class:`~pandera.api.pandas.model.DataFrameModel`.
"""
#: comma-separated values file
csv = "csv"
#: python dictionary
dict = "dict"
#: json file
json = "json"
#: feather file format. See
#: `here <https://arrow.apache.org/docs/python/fe
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key