Skip to content

Protocol

ipyvizzu.data.converters.pandas.protocol

This module provides protocol classes for pandas data frame converter.

ipyvizzu.data.converters.pandas.protocol.PandasDataFrame

Bases: Protocol

Represents a pandas DataFrame Protocol.

Source code in src/ipyvizzu/data/converters/pandas/protocol.py
@runtime_checkable
class PandasDataFrame(Protocol):
    """
    Represents a pandas DataFrame Protocol.
    """

    # pylint: disable=too-few-public-methods

    index: Any
    columns: Sequence[str]
    sample: Callable[..., Any]
    __len__: Callable[[], int]
    __getitem__: Callable[[Any], Any]

ipyvizzu.data.converters.pandas.protocol.PandasSeries

Bases: Protocol

Represents a pandas Series Protocol.

Source code in src/ipyvizzu/data/converters/pandas/protocol.py
@runtime_checkable
class PandasSeries(Protocol):
    """
    Represents a pandas Series Protocol.
    """

    # pylint: disable=too-few-public-methods

    index: Any
    values: Any
    dtype: Any
    __len__: Callable[[], int]
    __getitem__: Callable[[Any], Any]