diff --git a/doc/source/io.rst b/doc/source/io.rst index d436fa52918d3..3661d4b4cdff7 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1481,7 +1481,7 @@ function takes a number of arguments. Only the first is required. - ``encoding``: a string representing the encoding to use if the contents are non-ASCII, for python versions prior to 3 - ``line_terminator``: Character sequence denoting line end (default '\\n') - - ``quoting``: Set quoting rules as in csv module (default csv.QUOTE_MINIMAL) + - ``quoting``: Set quoting rules as in csv module (default csv.QUOTE_MINIMAL). Note that if you have set a `float_format` then floats are converted to strings and csv.QUOTE_NONNUMERIC will treat them as non-numeric - ``quotechar``: Character used to quote fields (default '"') - ``doublequote``: Control quoting of ``quotechar`` in fields (default True) - ``escapechar``: Character used to escape ``sep`` and ``quotechar`` when diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 1cc689528caaa..0b446c26c977d 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -1345,7 +1345,9 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None, The newline character or character sequence to use in the output file quoting : optional constant from csv module - defaults to csv.QUOTE_MINIMAL + defaults to csv.QUOTE_MINIMAL. If you have set a `float_format` + then floats are comverted to strings and thus csv.QUOTE_NONNUMERIC + will treat them as non-numeric quotechar : string (length 1), default '\"' character used to quote fields doublequote : boolean, default True