@@ -179,6 +179,10 @@ mangle_dupe_cols : boolean, default ``True``
179
179
Passing in ``False `` will cause data to be overwritten if there are duplicate
180
180
names in the columns.
181
181
182
+ .. deprecated :: 1.5.0
183
+ The argument was never implemented, and a new argument where the
184
+ renaming pattern can be specified will be added instead.
185
+
182
186
General parsing configuration
183
187
+++++++++++++++++++++++++++++
184
188
@@ -611,6 +615,10 @@ If the header is in a row other than the first, pass the row number to
611
615
Duplicate names parsing
612
616
'''''''''''''''''''''''
613
617
618
+ .. deprecated :: 1.5.0
619
+ ``mangle_dupe_cols `` was never implemented, and a new argument where the
620
+ renaming pattern can be specified will be added instead.
621
+
614
622
If the file or header contains duplicate names, pandas will by default
615
623
distinguish between them so as to prevent overwriting data:
616
624
@@ -621,27 +629,7 @@ distinguish between them so as to prevent overwriting data:
621
629
622
630
There is no more duplicate data because ``mangle_dupe_cols=True `` by default,
623
631
which modifies a series of duplicate columns 'X', ..., 'X' to become
624
- 'X', 'X.1', ..., 'X.N'. If ``mangle_dupe_cols=False ``, duplicate data can
625
- arise:
626
-
627
- .. code-block :: ipython
628
-
629
- In [2]: data = 'a,b,a\n0,1,2\n3,4,5'
630
- In [3]: pd.read_csv(StringIO(data), mangle_dupe_cols=False)
631
- Out[3]:
632
- a b a
633
- 0 2 1 2
634
- 1 5 4 5
635
-
636
- To prevent users from encountering this problem with duplicate data, a ``ValueError ``
637
- exception is raised if ``mangle_dupe_cols != True ``:
638
-
639
- .. code-block :: ipython
640
-
641
- In [2]: data = 'a,b,a\n0,1,2\n3,4,5'
642
- In [3]: pd.read_csv(StringIO(data), mangle_dupe_cols=False)
643
- ...
644
- ValueError: Setting mangle_dupe_cols=False is not supported yet
632
+ 'X', 'X.1', ..., 'X.N'.
645
633
646
634
.. _io.usecols :
647
635
0 commit comments