-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use common add_df method, use Protocol
- Loading branch information
Showing
11 changed files
with
134 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
""" | ||
This module provides modules for numpy converter. | ||
""" | ||
|
||
from ipyvizzu.data.converters.numpy.converter import NumpyArrayConverter | ||
from ipyvizzu.data.converters.numpy.type_alias import ( | ||
Index, | ||
Name, | ||
DType, | ||
ColumnName, | ||
ColumnDtype, | ||
ColumnConfig, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
This module provides modules for pandas converter. | ||
""" | ||
|
||
from ipyvizzu.data.converters.pandas.converter import PandasDataFrameConverter | ||
from ipyvizzu.data.converters.pandas.protocol import PandasDataFrame, PandasSeries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
""" | ||
This module provides protocol classes for pandas data frame converter. | ||
""" | ||
|
||
from typing import Any, Callable, Sequence | ||
from typing_extensions import Protocol, runtime_checkable | ||
|
||
|
||
@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] | ||
|
||
|
||
@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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
This module provides modules for pyspark converter. | ||
""" | ||
|
||
from ipyvizzu.data.converters.spark.converter import SparkDataFrameConverter | ||
from ipyvizzu.data.converters.spark.protocol import SparkDataFrame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
This module provides protocol classes for pandas data frame converter. | ||
""" | ||
|
||
from typing import Any, Callable, Sequence | ||
from typing_extensions import Protocol, runtime_checkable | ||
|
||
|
||
@runtime_checkable | ||
class SparkDataFrame(Protocol): | ||
""" | ||
Represents a pyspark DataFrame Protocol. | ||
""" | ||
|
||
# pylint: disable=too-few-public-methods | ||
|
||
columns: Sequence[str] | ||
count: Callable[..., int] | ||
sample: Callable[..., Any] | ||
limit: Callable[..., Any] | ||
select: Callable[..., Any] | ||
withColumn: Callable[..., Any] | ||
rdd: Any |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters