Skip to content

Commit

Permalink
Fix edge case around NaN values (#4964)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Jun 22, 2018
1 parent b344056 commit e1618dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def df_metrics_to_num(df, metrics):
"""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"""
Expand Down

0 comments on commit e1618dd

Please sign in to comment.