You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/user_guide/io.rst
+2-2
Original file line number
Diff line number
Diff line change
@@ -1689,7 +1689,7 @@ The ``Series`` and ``DataFrame`` objects have an instance method ``to_csv`` whic
1689
1689
allows storing the contents of the object as a comma-separated-values file. The
1690
1690
function takes a number of arguments. Only the first is required.
1691
1691
1692
-
* ``path_or_buf``: A string path to the file to write or a StringIO
1692
+
* ``path_or_buf``: A string path to the file to write or a file object. If a file object it must be opened with `newline=''`
1693
1693
* ``sep`` : Field delimiter for the output file (default ",")
1694
1694
* ``na_rep``: A string representation of a missing value (default '')
1695
1695
* ``float_format``: Format string for floating point numbers
@@ -1702,7 +1702,7 @@ function takes a number of arguments. Only the first is required.
1702
1702
* ``mode`` : Python write mode, default 'w'
1703
1703
* ``encoding``: a string representing the encoding to use if the contents are
1704
1704
non-ASCII, for Python versions prior to 3
1705
-
* ``line_terminator``: Character sequence denoting line end (default '\\n')
1705
+
* ``line_terminator``: Character sequence denoting line end (default `os.linesep`)
1706
1706
* ``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
1707
1707
* ``quotechar``: Character used to quote fields (default '"')
1708
1708
* ``doublequote``: Control quoting of ``quotechar`` in fields (default True)
0 commit comments