From 2b25110ee07c77d2733b4d5a3501b45c4f24eef7 Mon Sep 17 00:00:00 2001 From: Curtis Stallings Date: Tue, 8 Nov 2022 12:37:27 -0600 Subject: [PATCH] fix with float --- pyproject.toml | 2 +- pytabular/query.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 22e667b..fb8f840 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "python_tabular" -version = "0.1.9.2" +version = "0.1.9.4" authors = [ { name="Curtis Stallings", email="curtisrstallings@gmail.com" }, ] diff --git a/pytabular/query.py b/pytabular/query.py index fa63a6b..488125c 100644 --- a/pytabular/query.py +++ b/pytabular/query.py @@ -60,12 +60,13 @@ def Query(self, Query_Str: str) -> Union[pd.DataFrame, str, int]: """This is a bit garbage will need to refactor later but fixing issue with System.Decimal conversion""" Results.append( [ - Query.GetValue(index) - if Query.GetDataTypeName((index)) not in ("Object", "Decimal") - else Query.GetValue(index).ToDouble(Query.GetValue(index)) + Query.GetValue(index).ToDouble(Query.GetValue(index)) + if Query.GetDataTypeName((index)) in ("Decimal") + else Query.GetValue(index) for index in range(0, len(Column_Headers)) ] ) + Query.Close() logger.debug("Data retrieved... reading...") df = pd.DataFrame(Results, columns=[value for _, value in Column_Headers])