Skip to content

Instantly share code, notes, and snippets.

@vaishaks
Created January 22, 2015 08:05
Show Gist options
  • Save vaishaks/5efa1082e589b05056b4 to your computer and use it in GitHub Desktop.
Save vaishaks/5efa1082e589b05056b4 to your computer and use it in GitHub Desktop.
rows = tables[0].find_all('tr') # Extract all rows from the first table
start = 0
stop = 0
# Find the starting point
for row in rows:
if 'STATES' in str(row):
break
start += 1
start += 1
stop = start
for row in rows[start:]:
if 'TOTAL (ALL INDIA)' in str(row):
break
stop += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment