From e52cf5866b0b447b4ee18e81080932e580fdf3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 25 Dec 2022 01:43:54 +0100 Subject: [PATCH] CSV --- README.md | 1 + index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index 35ae208..ecf964c 100644 --- a/README.md +++ b/README.md @@ -1818,6 +1818,7 @@ import csv * **File must be opened with a `'newline=""'` argument, or newlines embedded inside quoted fields will not be interpreted correctly!** * **To print the spreadsheet to the console use [Tabulate](#table) library.** * **For XML and binary Excel files (xlsx, xlsm and xlsb) use [Pandas](#dataframe-plot-encode-decode) library.** +* **Reader accepts any iterator of strings, not just files.** ### Write ```python diff --git a/index.html b/index.html index 9340cbf..1c7c430 100644 --- a/index.html +++ b/index.html @@ -1515,6 +1515,7 @@ CompletedProcess(args=['bc', 'newline=""' argument, or newlines embedded inside quoted fields will not be interpreted correctly!
  • To print the spreadsheet to the console use Tabulate library.
  • For XML and binary Excel files (xlsx, xlsm and xlsb) use Pandas library.
  • +
  • Reader accepts any iterator of strings, not just files.
  • Write

    <writer> = csv.writer(<file>)       # Also: `dialect='excel', delimiter=','`.
     <writer>.writerow(<collection>)     # Encodes objects using `str(<el>)`.