From 3783fcff13282af92412b7f81e47586f58ee6797 Mon Sep 17 00:00:00 2001 From: Vera Sativa Date: Sat, 2 Feb 2019 13:44:09 -0300 Subject: [PATCH] fix: crash on null values from access long type Changed the conversion from access long type to pandas float instead of pandas int, in order to support null values. Note that pandas just released int null support @ pandas .24, but still experimental. --- pandas_access/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas_access/__init__.py b/pandas_access/__init__.py index 9fffccb..d94aecd 100644 --- a/pandas_access/__init__.py +++ b/pandas_access/__init__.py @@ -34,7 +34,8 @@ def _extract_dtype(data_type): if data_type.startswith('double'): return np.float_ elif data_type.startswith('long'): - return np.int_ + # access CAN have null values on long type, @ pandas 0.24 int null suport is experimental, a float is safer for now. + return np.float_ else: return None