From 020c763be27e3dcd9719b6e59a77b66d14552afa Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Thu, 7 Jul 2016 20:41:10 +0200 Subject: [PATCH] viz: make sunburst work again By using a different method for renaming the metric columns Thanks to @simobasso for the help! Fix #673 --- caravel/viz.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/caravel/viz.py b/caravel/viz.py index 6a8744318e86..f23b9352cea5 100755 --- a/caravel/viz.py +++ b/caravel/viz.py @@ -1304,9 +1304,8 @@ def get_data(self): metric = self.form_data.get('metric') secondary_metric = self.form_data.get('secondary_metric') if metric == secondary_metric: - ndf = df[cols] - ndf['m1'] = df[metric] - ndf['m2'] = df[metric] + ndf = df + ndf.columns = [cols + ['m1', 'm2']] else: cols += [ self.form_data['metric'], self.form_data['secondary_metric']]