Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to plot stacked bar chart from grouped data pandas

df.groupby(['feature1', 'feature2']).size().unstack() 
           .plot(kind='bar', stacked=True)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #plot #stacked #bar #chart #grouped #data #pandas
ADD COMMENT
Topic
Name
6+8 =