in [ ]party_counts party_counts ix[: : figure - dataframe bar plot example figure - dataframe stacked bar plot example thennormalize so that each row sums to ( have to cast to float to avoid integer division issues on python and make the plot (see figure - )normalize to sum to in [ ]party_pcts party_counts div(party_counts sum( astype(float)axis= plotting functions in pandas www it-ebooks info