title: Python: How to pass multiple x, y coordinates from a df into a function at once?
body: <p>I have a df containing x, y coordinates that looks like this:</p>
  <pre><code>x    y
  280  230
  230  247
  219  255
  209  270
  203  290
  199  313
  198  336
  204  365
  208  372
  220  392
  253  429
  281  448
  ...  ...
  </code></pre>
  <p>The function that I created must take in 4 x coordinates and 4 corresponding y coordinates at a time, however I don't know how to iterate through a df and pass 4 rows of data at a time. Here is an example of my function call at the moment:</p>
  <pre><code>my_function(ax, ay, bx, by, cx, cy, dx, dy)
  </code></pre>
  <p>The function call doesn't have to be this way, I just need to be able to access all 4 x and y coordinates.</p>
  <p>How would I go about passing the data into my function?</p>
  <p><strong>Edit</strong>: Just to clarify, the rows need to be passed in on a rolling basis, so I would like to call <code>my_function(x1, y1, x2, y2, x3, y3, x4, y4)</code> and then <code>my_function(x2, y2, x3, y3, x4, y4, x5, y5)</code> and so on...</p>