title: Finding the best combinations
body: <p>I'm looking for the approach to solve the following problem.</p>
  
  <p>Suppose I've this product grid.</p>
  
  <pre><code>table = [{'Products': 'Prod1', 'Unit1': 32, 'Unit2': 32, 'Unit3': 27, 'Unit4': 15 },
           {'Products': 'Prod2', 'Unit1': 35, 'Unit2': 12, 'Unit3': 19, 'Unit4': 29 },
           {'Products': 'Prod3', 'Unit1': 37, 'Unit2': 36, 'Unit3': 36, 'Unit4': 19 },
           {'Products': 'Prod4', 'Unit1': 16, 'Unit2': 15, 'Unit3': 18, 'Unit4': 31 },
           {'Products': 'Prod5', 'Unit1': 14, 'Unit2': 32, 'Unit3': 20, 'Unit4': 33 },
           {'Products': 'Prod6', 'Unit1': 10, 'Unit2': 33, 'Unit3': 28, 'Unit4': 36 },
           {'Products': 'Prod7', 'Unit1': 18, 'Unit2': 22, 'Unit3': 27, 'Unit4': 30 },
           {'Products': 'Prod8', 'Unit1': 11, 'Unit2': 13, 'Unit3': 20, 'Unit4': 26 }]
  
  df = pd.DataFrame(table)
  </code></pre>
  
  <p>Each value reflects the maximum revenue I'll get by selling this product. E.g. Selling 2 units of <code>prod1</code>, I'll get $32. For each product I can sell maximum of 4 units. And total I can sell maximum of 16 units (4*4). My objective is to maximize the total revenue. In the example given I'll sell the following combinations to maximize my revenue:</p>
  
  <pre><code>{prod1: 2 units (32),
   prod2: 1 unit  (35),
   prod3: 1 unit  (37),
   prod4: 4 units (31),
   prod5: 4 units (33),
   prod6: 4 units (36)}
  </code></pre>
  
  <p>My question is, how I can formulate it algorithmically?</p>