Skip to content

Commit

Permalink
[bugfix] add support for numeric nodes in Sankey (apache#5154)
Browse files Browse the repository at this point in the history
* [bugfix] add support for numeric nodes in Sankey

closes apache#5142

* lint
  • Loading branch information
mistercrunch authored Jun 22, 2018
1 parent d132085 commit 2e82432
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1596,6 +1597,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)
Expand Down

0 comments on commit 2e82432

Please sign in to comment.