You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ma...@apache.org on 2018/06/22 01:10:07 UTC
[incubator-superset] branch master updated: Fix edge case around
NaN values (#4964)
This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new e1618dd Fix edge case around NaN values (#4964)
e1618dd is described below
commit e1618ddddba50185375353417dd29826172084aa
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Thu Jun 21 18:10:04 2018 -0700
Fix edge case around NaN values (#4964)
---
superset/viz.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/viz.py b/superset/viz.py
index f3c7b15..769a1af 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -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"""