Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 99664ad

Browse filesBrowse files
PR feedback
1 parent c610d17 commit 99664ad
Copy full SHA for 99664ad

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
  • packages/python/plotly/plotly/express
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎packages/python/plotly/plotly/express/_core.py

Copy file name to clipboardExpand all lines: packages/python/plotly/plotly/express/_core.py
+4-3Lines changed: 4 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.