zhaoyongjie commented on a change in pull request #15975: URL: https://github.com/apache/superset/pull/15975#discussion_r679901446
########## File path: superset/utils/pandas_postprocessing.py ########## @@ -264,6 +264,16 @@ def pivot( # pylint: disable=too-many-arguments # Remove once/if support is added. aggfunc = {na.column: na.aggfunc for na in aggregate_funcs.values()} + # When dropna = False, the pivot_table function will calculate cartesian-product + # for MultiIndex. + # https://github.com/apache/superset/issues/15956 + # https://github.com/pandas-dev/pandas/issues/18030 + series_set = set() + if not drop_missing_columns and columns: + for row in df[columns].itertuples(): + metrics_and_series = list(aggfunc.keys()) + list(row[1:]) + series_set.add("".join([str(_) for _ in metrics_and_series])) Review comment: done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org