I have two DataFrames (trail1 and trail2) with the following columns: Genre, City and Number Sold. Now I want to create a histogram of both datasets for matching in size Genre and Total Number Sold. For each genre, I want two bars: one representing track 1, and the other representing track 2.
How can I achieve this using Pandas?
I tried the following approach, which did NOT work.
gf1 = df1.groupby(['Genre'])
gf2 = df2.groupby(['Genre'])
gf1Plot = gf1.sum().unstack().plot(kind='bar, stacked=False)
gf2Plot = gf2.sum().unstack().plot(kind='bar, ax=gf1Plot, stacked=False)
I want to see how the trail1 dataset is compared with the trial2 data for each of the genres (for example: spicy, sweet, sour, etc.)
I also tried using concat, but I can't figure out how to graphically concatenate a DataFrame on the same graph in order to compare two keys.
DF = pd.concat([df1,df2],keys=['trail1','trail2'])