kifield/kifield.py
def find_header_column(header, lbl):
    """Find the field header column containing the closest match to the given label."""

    header_labels = [cell.value for cell in header]
    lbl_match = lc_get_close_matches(lbl, header_labels, 1, 0.0)[0]
    for cell in header:
        if str(cell.value).lower() == lbl_match.lower():
            logger.log(
                DEBUG_OBSESSIVE,
                "Found {} on header column {}.".format(lbl, cell.column),
            )
            return cell.column, lbl_match
    raise FindLabelError("{} not found in spreadsheet".format(lbl))
Find the field header column containing the closest match to the given label.
Find the field header column containing the closest match to the given label.
Find the field header column containing the closest match to the given label .
def find_header_column(header, lbl):
    header_labels = [cell.value for cell in header]
    lbl_match = lc_get_close_matches(lbl, header_labels, 1, 0.0)[0]
    for cell in header:
        if str(cell.value).lower() == lbl_match.lower():
            logger.log(
                DEBUG_OBSESSIVE,
                "Found {} on header column {}.".format(lbl, cell.column),
            )
            return cell.column, lbl_match
    raise FindLabelError("{} not found in spreadsheet".format(lbl))
def find_header_column ( header , lbl ) : header_labels = [ cell . value for cell in header ] lbl_match = lc_get_close_matches ( lbl , header_labels , 1 , 0.0 ) [ 0 ] for cell in header : if str ( cell . value ) . lower ( ) == lbl_match . lower ( ) : logger . log ( DEBUG_OBSESSIVE , "Found {} on header column {}." . format ( lbl , cell . column ) , ) return cell . column , lbl_match raise FindLabelError ( "{} not found in spreadsheet" . format ( lbl ) )
Find the field header column containing the closest match to the given label.
Find the field header column containing the closest match to the given label .
"""Find the field header column containing the closest match to the given label."""
header
lbl