mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
Fix sqllab numpy array (#4629)
* Fixing error with sqllab numpy array * Adding tests for failing sqllab data type
This commit is contained in:
committed by
John Bodley
parent
ba9379b949
commit
5c98f5642b
@@ -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 = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user