Skip to content

Commit

Permalink
Rename parameter 'default_to_source' in SchemArrow
Browse files Browse the repository at this point in the history
This command changes the parameter name 'default_to_source' to 'default_target_type' in the SchemArrow class for increased clarity and accuracy. This makes it easier to comprehend the purpose of the parameter, which is to specify the default data type to use when no mapping is found for a specific source type.

Signed-off-by: DanielAvdar <[email protected]>
  • Loading branch information
DanielAvdar committed Mar 8, 2024
1 parent 579f33d commit 061f9d2
Showing 1 changed file with 3 additions and 3 deletions.
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 061f9d2

Please sign in to comment.