Skip to content

Commit 1a240f6

Browse files
Bernhard10jorisvandenbossche
authored andcommitted
DOC: Fix documentation for read_csv's mangle_dupe_cols (GH19203) (#19208)
1 parent de42bee commit 1a240f6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/source/io.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ squeeze : boolean, default ``False``
149149
prefix : str, default ``None``
150150
Prefix to add to column numbers when no header, e.g. 'X' for X0, X1, ...
151151
mangle_dupe_cols : boolean, default ``True``
152-
Duplicate columns will be specified as 'X.0'...'X.N', rather than 'X'...'X'.
152+
Duplicate columns will be specified as 'X', 'X.1'...'X.N', rather than 'X'...'X'.
153153
Passing in False will cause data to be overwritten if there are duplicate
154154
names in the columns.
155155

@@ -548,7 +548,7 @@ these names so as to prevent data overwrite:
548548
pd.read_csv(StringIO(data))
549549
550550
There is no more duplicate data because ``mangle_dupe_cols=True`` by default, which modifies
551-
a series of duplicate columns 'X'...'X' to become 'X.0'...'X.N'. If ``mangle_dupe_cols
551+
a series of duplicate columns 'X'...'X' to become 'X', 'X.1',...'X.N'. If ``mangle_dupe_cols
552552
=False``, duplicate data can arise:
553553

554554
.. code-block :: python

pandas/io/parsers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
prefix : str, default None
115115
Prefix to add to column numbers when no header, e.g. 'X' for X0, X1, ...
116116
mangle_dupe_cols : boolean, default True
117-
Duplicate columns will be specified as 'X.0'...'X.N', rather than
117+
Duplicate columns will be specified as 'X', 'X.1', ...'X.N', rather than
118118
'X'...'X'. Passing in False will cause data to be overwritten if there
119119
are duplicate names in the columns.
120120
dtype : Type name or dict of column -> type, default None

0 commit comments

Comments
 (0)