Iterating over geopandas.GeoDataFrame has exactly the same behaviour as iterating over pandas.DataFrame. I’d recommend checking their guide
https://pandas.pydata.org/docs/user_guide/basics.html#iteration
Yours `for incident in incidents` gives you column names, not rows.You will need itertuples or iterrows. But in this specific case, it will be faster to loop over xy series.
```
x_coords = incidents.geometry.x
y_coords = incidents.geometry.y
for x, y in zip(x_coords, y_coords):
node_near_incident = ox.distance.nearest_nodes(graph_proj, x, y, return_dist=False)
incident_nodes.append(node_near_incident)
```
Note that this code is not tested :).
Martin