title: Use dataframe row values as input for an API request
body: <p>I have a dataframe, let's say like this:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>id</th>
  <th>someValue</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>12345</td>
  <td>A</td>
  </tr>
  <tr>
  <td>67890</td>
  <td>B</td>
  </tr>
  <tr>
  <td>98765</td>
  <td>C</td>
  </tr>
  <tr>
  <td>43210</td>
  <td>D</td>
  </tr>
  <tr>
  <td>10987</td>
  <td>E</td>
  </tr>
  <tr>
  <td>12321</td>
  <td>F</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>How can I use individual row values of the id column as inputs in an API request body and loop for each row? As in, the first request, use id value of row 1, then the second request use id value of row 2, row 3, row 4, etc.</p>
  <p>The API request looks like this:</p>
  <pre class="lang-py prettyprint-override"><code>import requests
  import json
  
  url = &quot;https://api-url.com/api/v1/endpoint&quot;
  
  payload=&quot;{\&quot;query\&quot;:\&quot;{\\n  report(id:&quot;{ID VALUE OF ROW A}&quot;) {\\n    reportFieldA {\\n      name\\n      dimension\\n    }\\n  }\\n}\&quot;,\&quot;variables\&quot;:{}}&quot;
  
  headers = {
    'authorization': authtoken
  response = requests.request(&quot;POST&quot;, url, headers=headers, data=payload)
  
  print(response.text)
  </code></pre>