@@ -1305,7 +1305,8 @@ def _helper_csv(self, writer, na_rep=None, cols=None,
1305
1305
1306
1306
def to_csv (self , path_or_buf , sep = "," , na_rep = '' , float_format = None ,
1307
1307
cols = None , header = True , index = True , index_label = None ,
1308
- mode = 'w' , nanRep = None , encoding = None , quoting = None , line_terminator = '\n ' ):
1308
+ mode = 'w' , nanRep = None , encoding = None , quoting = None ,
1309
+ line_terminator = '\n ' ):
1309
1310
"""
1310
1311
Write DataFrame to a comma-separated values (csv) file
1311
1312
@@ -1337,7 +1338,8 @@ def to_csv(self, path_or_buf, sep=",", na_rep='', float_format=None,
1337
1338
a string representing the encoding to use if the contents are
1338
1339
non-ascii, for python versions prior to 3
1339
1340
line_terminator: string, default '\n '
1340
- The newline character or character sequence to use in the output file
1341
+ The newline character or character sequence to use in the output
1342
+ file
1341
1343
"""
1342
1344
if nanRep is not None : # pragma: no cover
1343
1345
import warnings
@@ -1361,8 +1363,8 @@ def to_csv(self, path_or_buf, sep=",", na_rep='', float_format=None,
1361
1363
delimiter = sep , encoding = encoding ,
1362
1364
quoting = quoting )
1363
1365
else :
1364
- csvout = csv .writer (f , lineterminator = line_terminator , delimiter = sep ,
1365
- quoting = quoting )
1366
+ csvout = csv .writer (f , lineterminator = line_terminator ,
1367
+ delimiter = sep , quoting = quoting )
1366
1368
self ._helper_csv (csvout , na_rep = na_rep ,
1367
1369
float_format = float_format , cols = cols ,
1368
1370
header = header , index = index ,
@@ -1442,8 +1444,8 @@ def to_string(self, buf=None, columns=None, col_space=None, colSpace=None,
1442
1444
"""
1443
1445
import warnings
1444
1446
if force_unicode is not None : # pragma: no cover
1445
- warnings .warn ("force_unicode is deprecated, it will have no effect" ,
1446
- FutureWarning )
1447
+ warnings .warn ("force_unicode is deprecated, it will have no "
1448
+ "effect" , FutureWarning )
1447
1449
1448
1450
if nanRep is not None : # pragma: no cover
1449
1451
warnings .warn ("nanRep is deprecated, use na_rep" ,
@@ -2397,7 +2399,8 @@ def _align_series(self, other, join='outer', axis=None, level=None,
2397
2399
if fill_na :
2398
2400
return (left_result .fillna (fill_value , method = method , limit = limit ,
2399
2401
axis = fill_axis ),
2400
- right_result .fillna (fill_value , method = method , limit = limit ))
2402
+ right_result .fillna (fill_value , method = method ,
2403
+ limit = limit ))
2401
2404
else :
2402
2405
return left_result , right_result
2403
2406
0 commit comments