10000 Update sunburst-charts.md · ordartur111/plotly.py@7f82ea6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f82ea6

Browse files
committed
Update sunburst-charts.md
1 parent 2d216e8 commit 7f82ea6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/python/sunburst-charts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jupyter:
66
extension: .md
77
format_name: markdown
88
format_version: '1.3'
9-
jupytext_version: 1.14.6
9+
jupytext_version: 1.16.1
1010
kernelspec:
1111
display_name: Python 3 (ipykernel)
1212
language: python
@@ -20,7 +20,7 @@ jupyter:
2020
name: python
2121
nbconvert_exporter: python
2222
pygments_lexer: ipython3
23-
version: 3.10.11
23+
version: 3.11.0
2424
plotly:
2525
description: How to make Sunburst Charts.
2626
display_as: basic
@@ -367,11 +367,11 @@ def build_hierarchical_dataframe(df, levels, value_column, color_columns=None):
367367
df_tree['parent'] = 'total'
368368
df_tree['value'] = dfg[value_column]
369369
df_tree['color'] = dfg[color_columns[0]] / dfg[color_columns[1]]
370-
df_all_trees = df_all_trees.append(df_tree, ignore_index=True)
370+
df_all_trees = pd.concat([df_all_trees, df_tree], ignore_index=True)
371371
total = pd.Series(dict(id='total', parent='',
372372
value=df[value_column].sum(),
373373
color=df[color_columns[0]].sum() / df[color_columns[1]].sum()))
374-
df_all_trees = df_all_trees.append(total, ignore_index=True)
374+
df_all_trees = pd.concat([df_all_trees, pd.DataFrame(total).T], ignore_index=True)
375375
return df_all_trees
376376

377377

0 commit comments

Comments
 (0)
0