(metadata_file)
Iterate over the rows of a `metadata.csv` file.
Iterate over the rows of a `metadata.csv` file.
Iterate over the rows of a metadata . csv file .
def read_metadata_rows(metadata_file):
    """
    Iterate over the rows of a `metadata.csv` file.
    """
    with io.open(metadata_file, 'r', encoding='utf-8') as f:
        reader = csv.DictReader(f, delimiter=',')

        # Read header
        reader._fieldnames = reader.fieldnames

        for line_no, row in enumerate(reader, 2):
            yield line_no, row
def read_metadata_rows ( metadata_file ) : with io . open ( metadata_file , 'r' , encoding = 'utf-8' ) as f : reader = csv . DictReader ( f , delimiter = ',' ) # Read header reader . _fieldnames = reader . fieldnames for line_no , row in enumerate ( reader , 2 ) : yield line_no , row