You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python/sunburst-charts.md
+47
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,53 @@ fig =px.sunburst(
62
62
fig.show()
63
63
```
64
64
65
+
### Sunburst of a rectangular DataFrame with plotly.express
66
+
67
+
Hierarchical data are often stored as a rectangular dataframe, with different columns corresponding to different levels of the hierarchy. `px.sunburst` can take a `path` parameter corresponding to a list of columns. Note that `id` and `parent` should not be provided if `path` is given.
If the dataset is not fully rectangular, missing values should be supplied as `None`. Note that the parents of `None` entries must be a leaf, i.e. it cannot have other children than `None` (otherwise a `ValueError` is raised).
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Sunburst` function from `plotly.graph_objects`.
Copy file name to clipboardExpand all lines: doc/python/treemaps.md
+46
Original file line number
Diff line number
Diff line change
@@ -51,6 +51,52 @@ fig = px.treemap(
51
51
fig.show()
52
52
```
53
53
54
+
### Treemap of a rectangular DataFrame with plotly.express
55
+
56
+
Hierarchical data are often stored as a rectangular dataframe, with different columns corresponding to different levels of the hierarchy. `px.treemap` can take a `path` parameter corresponding to a list of columns. Note that `id` and `parent` should not be provided if `path` is given.
If Plotly Express does not provide a good starting point, it is also possible to use the more generic `go.Treemap` function from `plotly.graph_objects`.
0 commit comments