Skip to content

Commit

Permalink
encoding in WriteCSV only active for Py3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
maet3608 committed Sep 1, 2020
1 parent 2209356 commit 13f809e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nutsflow/sink.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
from __future__ import absolute_import

import sys
import csv
import math
import io
Expand Down Expand Up @@ -553,7 +554,7 @@ class WriteCSV(NutSink):
"""

def __init__(self, filepath, cols=None, skipheader=0, flush=False,
encoding="utf-8", fmtfunc=lambda x: x, **kwargs):
encoding=None, fmtfunc=lambda x: x, **kwargs):
"""
WriteCSV(filepath, cols, skipheader, flush, fmtfunc, **kwargs)
Expand Down Expand Up @@ -587,6 +588,8 @@ def __init__(self, filepath, cols=None, skipheader=0, flush=False,
If None all columns are written.
:param int skipheader: Number of header rows to skip.
:param bool flush: If True flush after every line written.
:param str encoding: Character encoding, e.g. "utf-8"
Ignored for Python 2.x!
:param function fmtfunc: Function to apply to the elements of each row.
:param kwargs kwargs: Keyword arguments for Python's CSV writer.
See https://docs.python.org/2/library/csv.html
Expand Down

0 comments on commit 13f809e

Please sign in to comment.