title: Google OR Tools constraints from DataFrame
body: <p>I would like to build a Google OR Tools model to use <code>linear_solver</code> for a <code>CBC_MIXED_INTEGER_PROGRAMMING</code>.
  Following <a href="https://developers.google.com/optimization/mip/integer_opt" rel="nofollow noreferrer">Google tutorial</a> I learned hot to build the constraints but I have a question...<strong>is it necessary to hand write every constraint?</strong>
  I mean, I have the following DataFrame <code>df_constraint</code> which contain the coefficient of the constraints in the form of <code>ax+by&lt;=c</code>.</p>
  
  <pre><code>+---+---+---+
  | A | B | C |
  +---+---+---+
  | 1 | 5 | 7 |
  | 2 | 9 | 3 |
  | 3 | 0 | 4 |
  +---+---+---+
  </code></pre>
  
  <p>the table could be translated into the following contraints</p>
  
  <pre><code># 1x+5y&lt;=7
  constraint1 = solver.Constraint(-solver.infinity(), 7)
  constraint1.SetCoefficient(x, 1)
  constraint1.SetCoefficient(y, 5)
  
  # 2x+9y&lt;=3
  constraint2 = solver.Constraint(-solver.infinity(), 3)
  constraint2.SetCoefficient(x, 2)
  constraint2.SetCoefficient(y, 9)
  
  # 3x&lt;=4
  constraint3 = solver.Constraint(-solver.infinity(), 4)
  constraint3.SetCoefficient(x, 3)
  </code></pre>
  
  <p>Instead of write every rows I would like something like this:</p>
  
  <pre><code>for index, row in df.iterrows():
      constraint = solver.Constraint(-solver.infinity(), row['C'])
      constraint.SetCoefficient(x, row['A'])
      constraint.SetCoefficient(y, row['B'])
  </code></pre>
  
  <p>My snippet won't work, as every constraint must have a different name (like <code>constraint1</code>, <code>constraint2</code>, ...).</p>