Skip to content

Commit

Permalink
code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Aug 2, 2021
1 parent b5fb908 commit 8ef3051
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions superset/utils/pandas_postprocessing.py
Expand Up @@ -271,11 +271,8 @@ def pivot( # pylint: disable=too-many-arguments
series_set = set()
if not drop_missing_columns and columns:
for row in df[columns].itertuples():
metrics_and_series = []
for metric in aggfunc.keys():
metrics_and_series.append(tuple([metric]) + tuple(row[1:]))
for m_series in metrics_and_series:
series_set.add(str(m_series))
series_set.add(str(tuple([metric]) + tuple(row[1:])))

df = df.pivot_table(
values=aggfunc.keys(),
Expand Down

0 comments on commit 8ef3051

Please sign in to comment.