diff --git a/caravel/viz.py b/caravel/viz.py index 4c82afe850af6..4a0e6d358262a 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']]