def load_csv_data(resource_name):
    # type: (str) -> List[str]
    """ Loads first column of specified CSV file from package data.
    """
    data_bytes = pkgutil.get_data('clkhash', 'data/{}'.format(resource_name))
    if data_bytes is None:
        raise ValueError("No data resource found with name {}".format(resource_name))
    else:
        data = data_bytes.decode('utf8')
        reader = csv.reader(data.splitlines())
        next(reader, None)  # skip the headers
        return [row[0] for row in reader]
def load_csv_data ( resource_name ) : data_bytes = pkgutil . get_data ( 'clkhash' , 'data/{}' . format ( resource_name ) ) if data_bytes is None : raise ValueError ( "No data resource found with name {}" . format ( resource_name ) ) else : data = data_bytes . decode ( 'utf8' ) reader = csv . reader ( data . splitlines ( ) ) next ( reader , None ) return [ row [ 0 ] for row in reader ]
Loads first column of specified CSV file from package data.