I'm looking for method, that iterates over the rows, but apply some method only for every 20th or 30th row values so something like:
UPDATED CODE
for index, row in df.iterrows(), index=+20: location= geolocator.reverse("%s, %s" % (row['lat'],row['long']),timeout=None) row['location']=location.address time.sleep(3) return df Actually I try to minimize the number of requests, cause otherwise I have the timeout issue. That's why I tried iterate over the rows, and apply the function of request only for every 20th or 60th row (cause I have 7000 rows) and not to speed the process by applying the time.sleep method