def extractRow(row):
 statistic = row[2].strip()
 if (statistic == 'New cases'):
  return
 location = row[1].strip()
 if (location == 'National'):
  return
 elif (' and ' in location):
  if (location in rejected_loc):
   rejected_loc[location] += 1
  else:
   rejected_loc[location] = 1
  return
 country = row[0].strip()
 if (not (location in location_list)):
  location = string.capwords(location)
  loc_row = get_loc_from_db(location, country)
  location_list[location] = loc_row
 if (location_list[location] is not None):
  storeRow(location, row, country)

def extractRow ( row ) : statistic = row [ 2 ] . strip ( ) if ( statistic == 'New cases' ) : return location = row [ 1 ] . strip ( ) if ( location == 'National' ) : return elif ( ' and ' in location ) : if ( location in rejected_loc ) : rejected_loc [ location ] += 1 else : rejected_loc [ location ] = 1 return country = row [ 0 ] . strip ( ) if ( not ( location in location_list ) ) : location = string . capwords ( location ) loc_row = get_loc_from_db ( location , country ) location_list [ location ] = loc_row if ( location_list [ location ] is not None ) : storeRow ( location , row , country )
extract a row from our source spreadsheet .