Fix sqllab numpy array (#4629)

* Fixing error with sqllab numpy array

* Adding tests for failing sqllab data type
This commit is contained in:
michellethomas
2018-03-19 11:43:04 -07:00
committed by John Bodley
parent ba9379b949
commit 5c98f5642b
2 changed files with 11 additions and 3 deletions

View File

@@ -97,7 +97,7 @@ def convert_results_to_df(cursor_description, data):
if data:
first_row = data[0]
has_dict_col = any([isinstance(c, dict) for c in first_row])
df_data = list(data) if has_dict_col else np.array(data)
df_data = list(data) if has_dict_col else np.array(data, dtype=object)
else:
df_data = []