csv.writer.writerows()
csv.writer.writerows() is a Python method in the CSV Module category. Writes multiple rows to the CSV file efficiently. The syntax is csv.writer.writerows(rows). Parameters: rows — iterable of rows. Returns: None. A typical example: writer.writerows([["A",1], ["B",2], ["C",3]]). 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.writerow(), csv.Sniffer().sniff().