mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix: reindex when combine metric in legacy pivot table (#14708)
This commit is contained in:
parent
dbebaf219b
commit
9729ffd7a1
@ -936,7 +936,7 @@ class PivotTableViz(BaseViz):
|
||||
|
||||
# Display metrics side by side with each column
|
||||
if self.form_data.get("combine_metric"):
|
||||
df = df.stack(0).unstack()
|
||||
df = df.stack(0).unstack().reindex(level=-1, columns=metrics)
|
||||
return dict(
|
||||
columns=list(df.columns),
|
||||
html=df.to_html(
|
||||
|
Loading…
Reference in New Issue
Block a user