mistercrunch closed pull request #5154: [bugfix] add support for numeric nodes
in Sankey
URL: https://github.com/apache/incubator-superset/pull/5154
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/superset/viz.py b/superset/viz.py
index 90f202480e..7994f1ffe5 100644
--- a/superset/viz.py
+++ b/superset/viz.py
@@ -31,6 +31,7 @@
import numpy as np
import pandas as pd
from pandas.tseries.frequencies import to_offset
+from past.builtins import basestring
import polyline
import simplejson as json
from six import string_types, text_type
@@ -1593,6 +1594,8 @@ def query_obj(self):
def get_data(self, df):
df.columns = ['source', 'target', 'value']
+ df['source'] = df['source'].astype(basestring)
+ df['target'] = df['target'].astype(basestring)
recs = df.to_dict(orient='records')
hierarchy = defaultdict(set)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]