Skip to content

Commit 2f401e0

Browse files
PR feedback
1 parent c21c96c commit 2f401e0

File tree

1 file changed

+4
-3
lines changed
  • packages/python/plotly/plotly/express

1 file changed

+4
-3
lines changed

Diff for: packages/python/plotly/plotly/express/_core.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1432,11 +1432,12 @@ def process_dataframe_hierarchy(args):
14321432
_check_dataframe_all_leaves(df[path[::-1]])
14331433
discrete_color = False
14341434

1435+
new_path = []
14351436
for col_name in path:
1436-
series_to_copy = df[col_name]
14371437
new_col_name = col_name + "_path_copy"
1438-
path = [new_col_name if x == col_name else x for x in path]
1439-
df[new_col_name] = series_to_copy
1438+
new_path.append(new_col_name)
1439+
df[new_col_name] = df[col_name]
1440+
path = new_path
14401441
# ------------ Define aggregation functions --------------------------------
14411442

14421443
def aggfunc_discrete(x):

0 commit comments

Comments
 (0)