From 56a767381a071a52572c6bc3f175c1b086fbc5fa Mon Sep 17 00:00:00 2001 From: Aliaksandr Veramkovich <37269131+Veramkovich@users.noreply.github.com> Date: Mon, 4 Jul 2022 23:41:58 +0300 Subject: [PATCH] Update py2.py Improved performance for big CSV files --- unicodecsv/py2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unicodecsv/py2.py b/unicodecsv/py2.py index f436397..f5299ae 100644 --- a/unicodecsv/py2.py +++ b/unicodecsv/py2.py @@ -86,8 +86,9 @@ def writerow(self, row): _stringify_list(row, self.encoding, self.encoding_errors)) def writerows(self, rows): + rows = _stringify_list(rows, self.encoding, self.encoding_errors) for row in rows: - self.writerow(row) + self.writer.writerow(row) @property def dialect(self):