mirror of https://github.com/apache/superset.git
Fix edge case around NaN values (#4964)
This commit is contained in:
parent
b344056932
commit
e1618ddddb
|
@ -223,7 +223,7 @@ class BaseViz(object):
|
|||
"""Converting metrics to numeric when pandas.read_sql cannot"""
|
||||
for col, dtype in df.dtypes.items():
|
||||
if dtype.type == np.object_ and col in metrics:
|
||||
df[col] = pd.to_numeric(df[col])
|
||||
df[col] = pd.to_numeric(df[col], errors='coerce')
|
||||
|
||||
def query_obj(self):
|
||||
"""Building a query object"""
|
||||
|
|
Loading…
Reference in New Issue