Fix edge case around NaN values (#4964)

This commit is contained in:
Maxime Beauchemin 2018-06-21 18:10:04 -07:00 committed by GitHub
parent b344056932
commit e1618ddddb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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"""