From 9f92d5eeed37489ae9ea28df1061518ae0b4b861 Mon Sep 17 00:00:00 2001 From: Jason Adams Date: Fri, 3 Jul 2020 09:51:34 +1000 Subject: [PATCH] fix bug in _cast_pandas_column where decimal type was getting cast to "string" resulting in "StringArray requires a sequence of strings or pandas.NA" error. Cast to "str" instead --- awswrangler/_data_types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awswrangler/_data_types.py b/awswrangler/_data_types.py index 5121ca0ff..7471e55ee 100644 --- a/awswrangler/_data_types.py +++ b/awswrangler/_data_types.py @@ -455,7 +455,7 @@ def _cast_pandas_column(df: pd.DataFrame, col: str, current_type: str, desired_t elif desired_type == "decimal": df[col] = ( df[col] - .astype("string") + .astype("str") .apply(lambda x: Decimal(str(x)) if str(x) not in ("", "none", "None", " ", "") else None) ) elif desired_type == "string":