title: Count how often specific row values occur & output the combinations in Python
body: <p>I have a CSV that contains sales data that I want to iterate through to list categories that are purchased often by the same buyer. I think I can do this with a dictionary and <a href="https://stackoverflow.com/questions/34463263/count-the-frequency-of-words-from-a-column-in-python-using-external-csv-file">a script like this</a> but I am having trouble conceptualizing how to count how many times the same buyer shows up across different categories.</p>
  
  <p>CSV data sample:</p>
  
  <pre><code>buyer_id | order_id | category
  1, 10, shoes
  1, 11, outerwear
  2, 12, beauty
  2, 13, shoes
  2, 14, outerwear
  </code></pre>
  
  <p>In that sample, I would want to know that shoes, outerwear are a combination at least 2 times.</p>