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.