Coverage for src/ipyvizzu/data/converters/pandas/protocol.py: 100%
15 statements
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-26 15:29 +0000
« prev ^ index » next coverage.py v7.6.12, created at 2025-02-26 15:29 +0000
1"""
2This module provides protocol classes for pandas data frame converter.
3"""
5from typing import Any, Callable, Protocol, Sequence, runtime_checkable
8@runtime_checkable
9class PandasDataFrame(Protocol):
10 """
11 Represents a pandas DataFrame Protocol.
12 """
14 # pylint: disable=too-few-public-methods
16 index: Any
17 columns: Sequence[str]
18 sample: Callable[..., Any]
19 __len__: Callable[[], int]
20 __getitem__: Callable[[Any], Any]
23@runtime_checkable
24class PandasSeries(Protocol):
25 """
26 Represents a pandas Series Protocol.
27 """
29 # pylint: disable=too-few-public-methods
31 index: Any
32 values: Any
33 dtype: Any
34 __len__: Callable[[], int]
35 __getitem__: Callable[[Any], Any]