Hi,
I am trying to create a px.sunburst output, and for some reason “None” values assigned to leaf levels are simply showing up as “None” in the resulting sunburst. In other words, I expected to see a cut-out in the outermost ring of the sunburst, but instead I see a fully drawn/populated set of rings. Note that I am reading in the contents of a .csv file.
Here is what I am doing…
import plotly
import plotly.express as px
import pandas as pd
df = pd.read_csv('CellUsageStats.csv',dtype={'classes':str,'variants':str})
print(df.head(5))
fig = px.sunburst(df, path=['library', 'families', 'classes', 'posten', 'thresholds', 'variants', 'heights', 'drives', 'speeds'], values='population')
fig.show()
plotly.offline.plot(fig, filename='sunburst.html')
Where CellUsageStats.csv looks like…
library,families,classes,posten,thresholds,variants,heights,drives,speeds,population
g1m,buf,000,a,a,1|2|3,n,12,x3,9
g1m,inv,000,a,a,1|2|3,n,18,None,1
g1m,inv,001,a,a,1|2|3,n,18,x7,1
g1m,mux,000,a,a,1|2|3,n,12,x7,3
g1m,and,000,a,a,1|2|3,n,12,x9,3
What am I doing wrong here?
Thanks!
-Chris