Python DataFrame - plot a bar chart for data frame with grouped-by columns (at least two columns)
问题 I've been struggling to recreate this Excel graph in python using matlplotlib: The data is in a dataframe; I'm trying to automate the process of generating this graph. I've tried unstacking my dataframe, subplotting, but I haven't managed to create the "Zone" index which is so elegant in Excel. I have successfully managed to plot the graph without this "Zone" index, but that's not really what I want to do. Here is my code: data = pd.DataFrame( { 'Factory Zone': ["AMERICAS","APAC","APAC","APAC