use loop to query overpass api
<p>I have a csv file of bounding boxes, that I loaded using pandas in python. The dataframe is <em>df</em> and the column name is <em>coord</em>. Does anyone know how I could create a loop to pass the list to my overpass api query?</p>

<p>I tried this:</p>

<pre><code>import time
import overpass
api = overpass.API(timeout=900)

coords = [df['coord'][0:10]]
for coord in coords:
    results =[]
    params =[]
    params = 'node["power"="generator"]'+coord+';out skel;'
    results = api.Get(params, responseformat="json")
    time.sleep(5.0)
</code></pre>

<p>However, I got a multiple requests error.  </p>

<p>I also tried:</p>

<pre><code>x={}
x = (api.Get(param) for param in params)
</code></pre>

<p>But that returned a python object ( <code>&lt;generator object &lt;genexpr&gt; at 0x11755c0f8&gt;</code>) and I need the data as json.</p>

<p>Any help would be much appreciated!</p>