Plotly Sunburst Graph

Hi all,

I have been trying to make a sunburst graph,

My sample data frame looks like this:


1 0 False
2 1 False
3 2 True
4 1 True
5 2 True
6 1 False


I am aiming to make something like this. I tried with the code given below but am getting errors. What is the right way to do this?

In the plotly documentation, they always have a single value for doing this, I want a different value for all the items in path and therefore, created a list.

import as px 

figure=px.sunburst(data_set, path=['ID', 'A' , 'B'], values=[data_set.shape[0], data_set['A'].value_counts(), data_set['B'].value_counts()], color='A']

Tried referring to this as well: Labeling percentage on each sector in sunburst chart, but I did not understand where did they include the dataset.

Thank you for any help in advance!