Skip to content

Commit

Permalink
Merge pull request #5 from DanielAvdar/init
Browse files Browse the repository at this point in the history
param name fix to default_target_type
  • Loading branch information
DanielAvdar authored Mar 8, 2024
2 parents c137ec9 + bf4c243 commit 3f4d4cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ build-backend = "poetry.core.masonry.api"

[tool.ruff]
line-length = 120
include = ["pyproject.toml", "tests/**", "schemarrow/**",]# ".github/workflows/**", ]
include = ["pyproject.toml", "tests/**", "schemarrow/**",]

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "B", "I"]
Expand Down
6 changes: 3 additions & 3 deletions schemarrow/schema_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SchemArrow:
**disclaimer**: not yet implemented
:param custom_mapper: dictionary with key as the source data type and value as the target data type.
will override default mapping
:param default_to_source: Optional string specifying the default data type to use if no mapping is found for a
:param default_target_type: Optional string specifying the default data type to use if no mapping is found for a
specific data type. Default is "string[pyarrow]".
Methods:
Expand All @@ -25,11 +25,11 @@ def __init__(
self,
parquet_compatible: Optional[bool] = False,
custom_mapper: Optional[Dict[str, str]] = None,
default_to_source: Optional[str] = "string[pyarrow]",
default_target_type: Optional[str] = "string[pyarrow]",
):
self.parquet_compatible = parquet_compatible
self.additional_mapper_dicts = custom_mapper or {}
self.defaults_dtype = default_to_source
self.defaults_dtype = default_target_type
self._mapper = create_mapper() | self.additional_mapper_dicts

def __call__(self, df: pd.DataFrame) -> pd.DataFrame:
Expand Down

0 comments on commit 3f4d4cf

Please sign in to comment.