The following steps will serve as a guideline to build a bar graph:
Load the notebook with commands developed in step 2.1. (click on the link):
https://colab.research.google.com/drive/1mUKtrs0kJ8ve4t096mcArt6jxGhm3Q10?usp=sharing
Use column 'January 2022' to build a bar graph:
df1['January 2022'].plot.bar()
This command produces the following figure:
3. Previous figure could be very difficult to read and employ. A better alternative is to select ten categories with the highest value in column 'January 2022'. To do this it is necessary to reorder rows in descending value contained in column 'January 2022':
df1_descendent_order = df1.sort_values(by="January 2022", ascending=False)
4. The following command will select the first ten rows with the highest value in column 'January 2022' and show just the information in columns 'Goods Description' (index 1), and 'January 2022' (index 2):
df1_descendent_order.iloc[list(range(0,11)),[1, 2]]
5. The previous command could be combined with the command plot.bar() to produce a bar graph:
df1_descendent_order.iloc[list(range(0,11)),[1, 2]].plot.bar()
This command produces the following figure:
6. The Python code with all the steps is summarized in this Google Colab (click on the link):
https://colab.research.google.com/drive/1nBs9HfaD2l3BxVTUB48OT-9ZhqMRlnh6?usp=sharing