Generation

generate functionSat, 18 Feb 2023

There is a Pandas dataframe: regions sales 0 North America 4402.62 1 Europe 2424.67 2 Japan 1297.43 3 Other 791.34 Create a piechart with this data using Matplotlib

regions = ['North America', 'Europe', 'Japan', 'Other'] sales = [4402.62, 2424.67, 1297.43, 791.34] plt.pie(sales, labels=regions, autopct='%1.1f%%') plt.show()

Questions about programming?Chat with your personal AI assistant