serenajiang commented on a change in pull request #15975: URL: https://github.com/apache/superset/pull/15975#discussion_r680114563
########## File path: superset/utils/pandas_postprocessing.py ########## @@ -264,6 +264,17 @@ 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() + lst_to_str: Callable[[List[Any]], str] = lambda lst: "_".join(str(_) for _ in lst) Review comment: Yeah, but the join is not necessary - you can just call `str()` on a list to get a (deterministic) string representation of the list. ``` In [1]: str([0,"x"]) Out[1]: "[0, 'x']" ``` `tuple()` might be better (I assume the intention is to make the list hashable) -- 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