Skip to content

Commit 389ae8c

Browse files
committed
BUG: Align to_csv signatures with DataFrame and Series
Closes pandas-devgh-14054.
1 parent df2d9ab commit 389ae8c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/core/series.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -2538,16 +2538,17 @@ def from_csv(cls, path, sep=',', parse_dates=True, header=None,
25382538

25392539
return result
25402540

2541-
def to_csv(self, path, index=True, sep=",", na_rep='', float_format=None,
2542-
header=False, index_label=None, mode='w', encoding=None,
2543-
date_format=None, decimal='.'):
2541+
def to_csv(self, path=None, index=True, sep=",", na_rep='',
2542+
float_format=None, header=False, index_label=None,
2543+
mode='w', encoding=None, date_format=None, decimal='.'):
25442544
"""
25452545
Write Series to a comma-separated values (csv) file
25462546
25472547
Parameters
25482548
----------
2549-
path : string file path or file handle / StringIO. If None is provided
2550-
the result is returned as a string.
2549+
path : string or file handle, default None
2550+
File path or object, if None is provided the result is returned as
2551+
a string.
25512552
na_rep : string, default ''
25522553
Missing data representation
25532554
float_format : string, default None

0 commit comments

Comments
 (0)