From 389ae8c4149a4c026d99cdbb51b4228b287d11da Mon Sep 17 00:00:00 2001 From: gfyoung Date: Sun, 21 Aug 2016 23:54:22 -0400 Subject: [PATCH] BUG: Align to_csv signatures with DataFrame and Series Closes gh-14054. --- pandas/core/series.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 32edcf6e698a3..7979a230eed84 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2538,16 +2538,17 @@ def from_csv(cls, path, sep=',', parse_dates=True, header=None, return result - def to_csv(self, path, index=True, sep=",", na_rep='', float_format=None, - header=False, index_label=None, mode='w', encoding=None, - date_format=None, decimal='.'): + def to_csv(self, path=None, index=True, sep=",", na_rep='', + float_format=None, header=False, index_label=None, + mode='w', encoding=None, date_format=None, decimal='.'): """ Write Series to a comma-separated values (csv) file Parameters ---------- - path : string file path or file handle / StringIO. If None is provided - the result is returned as a string. + path : string or file handle, default None + File path or object, if None is provided the result is returned as + a string. na_rep : string, default '' Missing data representation float_format : string, default None