mirror of https://github.com/apache/superset.git
viz: use sort_values(inplace=True) instead of sort (#870)
This commit is contained in:
parent
ee9141a31a
commit
55afda3a7e
|
@ -1027,7 +1027,7 @@ class NVD3TimeSeriesViz(NVD3Viz):
|
|||
|
||||
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"):
|
||||
|
@ -1252,7 +1252,7 @@ class DistributionBarViz(DistributionPieViz):
|
|||
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,
|
||||
|
|
Loading…
Reference in New Issue