Hi there,
I’m trying to plot a break down of purchases by Category. The categories are hierarchical, but sometimes the categories max out at level 1, other times at 2 etc…
Unfortunately i get these ‘NULL’ leaves that are kind of ugly
Tried replacing the ‘NULL’ string with NaN (code below)
import plotly.express as px
import numpy as np
px.sunburst(df#.replace(to_replace ='Null', value = np.NaN)
, path = ['google_category_level_1_name'
,'google_category_level_2_name'
,'google_category_level_3_name'
,'google_category_level_4_name'
]
, values = 'buyer'
, title = f'{description}: User purchase category'
,branchvalues = 'remainder'
,width = 1100
,height = 1100)
I keep getting this error: 'Non-leaves rows are not permitted in the dataframe \n
is there a way to simply stop interpreting the path once the NULL is reached?