Skip to content

Commit

Permalink
viz: use sort_values(inplace=True) instead of sort (#870)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored and mistercrunch committed Aug 2, 2016
1 parent ee9141a commit 55afda3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caravel/viz.py
Expand Up @@ -1027,7 +1027,7 @@ def get_df(self, query_obj=None):

if self.sort_series:
dfs = df.sum()
dfs.sort(ascending=False)
dfs.sort_values(ascending=False, inplace=True)
df = df[dfs.index]

if form_data.get("contribution"):
Expand Down Expand Up @@ -1252,7 +1252,7 @@ def get_df(self, query_obj=None):
fd = self.form_data

row = df.groupby(self.groupby).sum()[self.metrics[0]].copy()
row.sort(ascending=False)
row.sort_values(ascending=False, inplace=True)
columns = fd.get('columns') or []
pt = df.pivot_table(
index=self.groupby,
Expand Down

0 comments on commit 55afda3

Please sign in to comment.