Sunburst chart with a continuous colorscale

I am trying to recreate the sample in Sunburst charts in Python, but Process finished with exit code 1.

The following is generated when ran:
Traceback (most recent call last):

  • File β€œ/home/mbolanosd/PycharmProjects/pythonProject1/GraficoColores.py”, line 42, in *
  • df_all_trees = build_hierarchical_dataframe(df, levels, value_column, color_columns)*
  •               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    
  • File β€œ/home/mbolanosd/PycharmProjects/pythonProject1/GraficoColores.py”, line 34, in build_hierarchical_dataframe*
  • df_all_trees = df_all_trees.append(df_tree, ignore_index=True)*
  •               ^^^^^^^^^^^^^^^^^^^*
    
  • File β€œ/home/mbolanosd/.virtualenvs/pythonProjectGraphs/lib/python3.11/site-packages/pandas/core/generic.py”, line 6204, in getattr*
  • return object.getattribute(self, name)*
  •       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
    

AttributeError: β€˜DataFrame’ object has no attribute β€˜append’. Did you mean: β€˜_append’?

As I am a novice in Python and using Pycharm as IDE, cannot make sense of how to fix the code for the example to work.