Skip to content

Commit

Permalink
Writing unicode str in WriteCSV under Py2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
maet3608 committed Aug 31, 2020
1 parent c7666e1 commit b07bac1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nutsflow/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ def __rrshift__(self, iterable):
for row in iterable:
row = row if is_iterable(row) else [row]
row = [row[i] for i in cols] if cols else row
self.writer.writerow([self.fmtfunc(r) for r in row])
row = [six.u(self.fmtfunc(r)) for r in row]
self.writer.writerow(row)
if self.flush:
self.csvfile.flush()

0 comments on commit b07bac1

Please sign in to comment.