Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #92 from john-bodley/john-bodley-cherry-pick-4964
Browse files Browse the repository at this point in the history
Fix edge case around NaN values (apache#4964)
  • Loading branch information
john-bodley authored Aug 15, 2018
2 parents f08017a + acda62c commit 5df10ab
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 @@ -217,7 +217,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 5df10ab

Please sign in to comment.