def get_header_length(fp):
    """
    Finds the header length in a BADC csv file
    :param fp: file path
    :return:
    """
    cnt_data = 0
    with open(fp) as f:
        line = f.readline()
        cnt = 1
        while line:
            l_sp = line.split(',')
            if l_sp[0].strip() == 'data':
                cnt_data = cnt
                break
            line = f.readline()
            cnt += 1

    return cnt_data