I want to make a chart after applying groupby
So I have applied
Sales_comparison = SalesData[['Region', 'Sales2015',
'Sales2016']].groupby(['Region']).agg(['sum'])
I have tried for the graph
ax = Sales_comparison[['Sales2015','Sales2016']].plot(kind='bar', title
="Sales by region comparison", figsize=(7.5, 5), legend=True, fontsize=12)
ax.set_xlabel("Region", fontsize=12)
ax.set_ylabel("Sales", fontsize=12)
x = Sales_comparison.Region.index.tolist()
x_pos = [i for i, _ in enumerate(x)]
plt.xticks(x_pos, x)
plt.show()
But it is of no use
Is there any easier and shorter way to do what I want to achieve?
The data can be found in Link for the data