def check_empty_fields_before_bounds(header, mapping_data, warnings):
 desc_field = 'Description'
 correction = 1
 primer_field = 'LinkerPrimerSequence'
 try:
  desc_field_ix = (header.index(desc_field) + correction)
  primer_field_ix = (header.index(primer_field) + correction)
 except ValueError:
  return warnings
 for curr_row in range(len(mapping_data)):
  for curr_col in range(primer_field_ix, desc_field_ix):
   curr_field = mapping_data[curr_row][curr_col].replace('\n', '')
   if (not curr_field):
    warnings.append(('Empty data field ' + ('%s found DCTB %d,%d' % (mapping_data[curr_row][curr_col].replace('\n', ''), (curr_row + correction), curr_col))))
 return warnings

def check_empty_fields_before_bounds ( header , mapping_data , warnings ) : desc_field = 'Description' correction = 1 primer_field = 'LinkerPrimerSequence' try : desc_field_ix = ( header . index ( desc_field ) + correction ) primer_field_ix = ( header . index ( primer_field ) + correction ) except ValueError : return warnings for curr_row in range ( len ( mapping_data ) ) : for curr_col in range ( primer_field_ix , desc_field_ix ) : curr_field = mapping_data [ curr_row ] [ curr_col ] . replace ( '\n' , '' ) if ( not curr_field ) : warnings . append ( ( 'Empty data field ' + ( '%s found DCTB %d,%d' % ( mapping_data [ curr_row ] [ curr_col ] . replace ( '\n' , '' ) , ( curr_row + correction ) , curr_col ) ) ) ) return warnings
checks for empty fields before description header .