pipeline/util.py
def write_csv(fname, header, rows):
    """Write an iterable of records to a csv file with optional header."""
    if not fname.endswith('.csv'):
        fname = '%s.csv' % os.path.splitext(fname)[0]

    with open(fname, 'w') as f:
        writer = csv.writer(f)
        if header: writer.writerow(header)
        writer.writerows(rows)
Write an iterable of records to a csv file with optional header.
Write an iterable of records to a csv file with optional header.
Write an iterable of records to a csv file with optional header .
def write_csv(fname, header, rows):
    if not fname.endswith('.csv'):
        fname = '%s.csv' % os.path.splitext(fname)[0]
    with open(fname, 'w') as f:
        writer = csv.writer(f)
        if header: writer.writerow(header)
        writer.writerows(rows)
def write_csv ( fname , header , rows ) : if not fname . endswith ( '.csv' ) : fname = '%s.csv' % os . path . splitext ( fname ) [ 0 ] with open ( fname , 'w' ) as f : writer = csv . writer ( f ) if header : writer . writerow ( header ) writer . writerows ( rows )
Write an iterable of records to a csv file with optional header.
Write an iterable of records to a csv file with optional header .
"""Write an iterable of records to a csv file with optional header."""
fname
header
rows