From 061f9d2cca61b7da4dfdcbce1a17002854163084 Mon Sep 17 00:00:00 2001 From: DanielAvdar <66269169+DanielAvdar@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:56:32 +0200 Subject: [PATCH] Rename parameter 'default_to_source' in SchemArrow 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 <66269169+DanielAvdar@users.noreply.github.com> --- schemarrow/schema_arrow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/schemarrow/schema_arrow.py b/schemarrow/schema_arrow.py index 00ffa67..c71af92 100644 --- a/schemarrow/schema_arrow.py +++ b/schemarrow/schema_arrow.py @@ -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: @@ -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: