From 9c03d5a0d4066927f0539433551d507ca937d0e0 Mon Sep 17 00:00:00 2001 From: Michael Hirsch Date: Tue, 19 Nov 2019 13:13:08 -0500 Subject: [PATCH] instantiates column as series with specified dtype --- eland/query_compiler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/eland/query_compiler.py b/eland/query_compiler.py index 1288ba3..102221f 100644 --- a/eland/query_compiler.py +++ b/eland/query_compiler.py @@ -219,8 +219,7 @@ class ElandQueryCompiler: for missing in missing_columns: is_source_field, pd_dtype = self._mappings.source_field_pd_dtype(missing) - df[missing] = None - df[missing].astype(pd_dtype) + df[missing] = pd.Series(dtype=pd_dtype) # Sort columns in mapping order df = df[self.columns]