title: Pandas find all combinations of rows under a budget
body: <p>I am trying to figure out a way to determine all possible combinations of rows within a DataFrame that are below a budget, so let's say I have a dataframe like this: </p>
  
  <pre><code>data = [['Bread', 9, 'Food'], ['Shoes', 20, 'Clothes'], ['Shirt', 15, 'Clothes'], ['Milk', 5, 'Drink'], ['Cereal', 8, 'Food'], ['Chips', 10, 'Food'], ['Beer', 15, 'Drink'], ['Popcorn', 3, 'Food'], ['Ice Cream', 6, 'Food'], ['Soda', 4, 'Drink']]
  df = pd.DataFrame(data, columns = ['Item', 'Price', 'Type'])
  df
  </code></pre>
  
  <p>Data</p>
  
  <pre><code>Item       Price  Type
  Bread      9      Food
  Shoes      20     Clothes
  Shirt      15     Clothes
  Milk       5      Drink
  Cereal     8      Food
  Chips      10     Food
  Beer       15     Drink
  Popcorn    3      Food
  Ice Cream  6      Food
  Soda       4      Drink
  </code></pre>
  
  <p>I want to find every combination that I could purchase for under a specific budget, let's say $35 for this example, while only getting one of each type. I'd like to get a new dataframe made up of rows for each combination that works with each item in its own column.</p>
  
  <p>I was trying to do it using itertools.product, but this can combine and add columns, but what I really need to do is combine and add a specific column based on values in another column. I'm a bit stumped now. </p>
  
  <p>Thanks for your help!</p>