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

Commit

Permalink
Fix edge case around NaN values (apache#4964)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored and timifasubaa committed Jul 25, 2018
1 parent 28802f5 commit bd2d358
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 bd2d358

Please sign in to comment.