mirror of
https://github.com/apache/superset.git
synced 2026-04-18 15:44:57 +00:00
fix: reindex when combine metric in legacy pivot table (#14708)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user