Skip to content

Commit 4dd734c

Browse files
shawnheidejorisvandenbossche
authored andcommitted
DOC: fix slashes in read_csv line_terminator/sep kwargs descriptions (pandas-dev#13761)
1 parent 4c2840e commit 4dd734c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
13061306
quotechar='"', line_terminator='\n', chunksize=None,
13071307
tupleize_cols=False, date_format=None, doublequote=True,
13081308
escapechar=None, decimal='.', **kwds):
1309-
"""Write DataFrame to a comma-separated values (csv) file
1309+
r"""Write DataFrame to a comma-separated values (csv) file
13101310
13111311
Parameters
13121312
----------
@@ -1343,7 +1343,7 @@ def to_csv(self, path_or_buf=None, sep=",", na_rep='', float_format=None,
13431343
a string representing the compression to use in the output file,
13441344
allowed values are 'gzip', 'bz2', 'xz',
13451345
only used when the first argument is a filename
1346-
line_terminator : string, default '\\n'
1346+
line_terminator : string, default ``'\n'``
13471347
The newline character or character sequence to use in the output
13481348
file
13491349
quoting : optional constant from csv module

pandas/io/parsers.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,11 @@
277277
Parser engine to use. The C engine is faster while the python engine is
278278
currently more feature-complete."""
279279

280-
_sep_doc = """sep : str, default {default}
280+
_sep_doc = r"""sep : str, default {default}
281281
Delimiter to use. If sep is None, will try to automatically determine
282-
this. Separators longer than 1 character and different from '\s+' will be
283-
interpreted as regular expressions, will force use of the python parsing
284-
engine and will ignore quotes in the data. Regex example: '\\r\\t'"""
282+
this. Separators longer than 1 character and different from ``'\s+'`` will
283+
be interpreted as regular expressions, will force use of the python parsing
284+
engine and will ignore quotes in the data. Regex example: ``'\r\t'``"""
285285

286286
_read_csv_doc = """
287287
Read CSV (comma-separated) file into DataFrame

0 commit comments

Comments
 (0)