@@ -9513,8 +9513,11 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
9513
9513
path_or_buf : string or file handle, default None
9514
9514
File path or object, if None is provided the result is returned as
9515
9515
a string.
9516
+
9516
9517
.. versionchanged:: 0.24.0
9517
- Was previously named "path" for Series.
9518
+
9519
+ Was previously named "path" for Series.
9520
+
9518
9521
sep : character, default ','
9519
9522
Field delimiter for the output file.
9520
9523
na_rep : string, default ''
@@ -9526,8 +9529,11 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
9526
9529
header : boolean or list of string, default True
9527
9530
Write out the column names. If a list of strings is given it is
9528
9531
assumed to be aliases for the column names
9532
+
9529
9533
.. versionchanged:: 0.24.0
9530
- Previously defaulted to False for Series.
9534
+
9535
+ Previously defaulted to False for Series.
9536
+
9531
9537
index : boolean, default True
9532
9538
Write row names (index)
9533
9539
index_label : string or sequence, or False, default None
@@ -9541,14 +9547,16 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
9541
9547
encoding : string, optional
9542
9548
A string representing the encoding to use in the output file,
9543
9549
defaults to 'ascii' on Python 2 and 'utf-8' on Python 3.
9544
- compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None},
9545
- default 'infer'
9546
- If 'infer' and `path_or_buf` is path-like, then detect compression
9547
- from the following extensions: '.gz', '.bz2', '.zip' or '.xz'
9548
- (otherwise no compression).
9550
+ compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None}
9551
+
9552
+ If 'infer' (the defualt) and `path_or_buf` is path-like, then
9553
+ detect compression from the following extensions: '.gz', '.bz2',
9554
+ '.zip' or '.xz' (otherwise no compression).
9549
9555
9550
9556
.. versionchanged:: 0.24.0
9557
+
9551
9558
'infer' option added and set to default
9559
+
9552
9560
line_terminator : string, default ``'\n'``
9553
9561
The newline character or character sequence to use in the output
9554
9562
file
@@ -9565,7 +9573,9 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
9565
9573
chunksize : int or None
9566
9574
rows to write at a time
9567
9575
tupleize_cols : boolean, default False
9576
+
9568
9577
.. deprecated:: 0.21.0
9578
+
9569
9579
This argument will be removed and will always write each row
9570
9580
of the multi-index as a separate row in the CSV file.
9571
9581
@@ -9579,7 +9589,8 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
9579
9589
European data
9580
9590
9581
9591
.. versionchanged:: 0.24.0
9582
- The order of arguments for Series was changed.
9592
+
9593
+ The order of arguments for Series was changed.
9583
9594
"""
9584
9595
9585
9596
df = self if isinstance (self , ABCDataFrame ) else self .to_frame ()
0 commit comments