Feature Request : Functionality to hide empty leaves in tree map

       0    1      2      3     4
0  alice  bob  chuck  david  ella
0  alice  bob  chuck  david  fred
0  alice  bob  chuck    NaN   NaN

Error : Non-leaves rows are not permitted in the dataframe

I want chuck to only show david as a child without a need to fill NaN (Hide empty box). when you have a None value in the last path column, its parent must be a leaf, ie its parents cannot have other children than None. i cannot even use dropna(). Is there any solution to bypass this issue ?

For now the workaround that i am using replacing NaN by text as “end of hierarchy”

As far as i understand the issue is because of the following code in plotly/express/_core.py

    for i, row in enumerate(row_strings[:-1]):
        if row_strings[i + 1] in row and (i + 1) in null_indices:
            raise ValueError(
                "Non-leaves rows are not permitted in the dataframe \n",
                df_sorted.iloc[i + 1],
                "is not a leaf.",