csv.writer.writerow()
csv.writer.writerow() is a Python method in the CSV Module category. Writes a single row to the CSV file (row is a sequence of values). The syntax is csv.writer.writerow(row). Parameters: row — iterable of values. Returns: Integer bytes written. A typical example: writer.writerow(["Alice", 30, "NYC"]). A close sibling is csv.reader(), which returns a reader object that iterates over lines in a CSV file. A close sibling is csv.writer(), which returns a writer object for writing rows to a CSV file. A close sibling is csv.DictReader(), which returns a reader that maps each row to a dict with field names as keys. A close sibling is csv.DictWriter(), which returns a writer that maps dicts to CSV rows using fieldnames. More about this category: CSV file reading and writing — reader, writer, DictReader, DictWriter. For a broader walkthrough, read the CSV Module guide. Related CSV Module entries: csv.reader(), csv.writer(), csv.DictReader(), csv.DictWriter(), csv.writer.writerows(), csv.Sniffer().sniff().