title: JupyterLab / Python / Pandas - Comparing two Dataframes
body: <p>I am trying to import two files and compare value counts in df1 (data by state) and a number in a row for that state in df2. </p>
  
  <p>In other words, in one Excel file I have something that looks like this:</p>
  
  <pre><code>State      Food
  Arizona    Bananas
  Arizona    Pears
  Arizona    Pickles
  Connecticut Potatoes
  Connecticut Apples
  </code></pre>
  
  <p>Etc. </p>
  
  <p>So from there I am interested in how many times the state appears, the value count.</p>
  
  <p>In another file I have a column of the 50 states and a number.</p>
  
  <p>What I am trying to do is basically create a dataframe that displays, by state, the number of times said state appears in df1 (so here Arizona would be 3) divided by the number in the column corresponding to Arizona in the second data frame. Does that make sense?</p>
  
  <p>The second dataframe contains a total population for each state, so the output of 3/n above would be fruit per capita. </p>