0
a     Yes  
b     No    
c     Yes  
a     No   
c     No    
a     Yes  
b     No  
b     Yes

So how can I get an output giving me a count of Yes and No for each letter in a pandas Dataframe?

    Yes    No
a    2      1   
b    1      2
c    1      1
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
user10939484
  • 167
  • 2
  • 13
  • `pd.crosstab(df.col1,df.col2)` – BENY Feb 19 '19 at 16:05
  • @Wen-Ben What I ended up using was a groupby.value_counts. Now I have a resulting object. What I'd like to do is create a double line graph with Letter on x, and Yes/No counts for each letter on y. Any idea? – user10939484 Feb 19 '19 at 16:53

0 Answers0