diff --git a/doc/source/io.rst b/doc/source/io.rst index 3e1619d6e1578..b15d3918eb569 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -149,7 +149,7 @@ squeeze : boolean, default ``False`` prefix : str, default ``None`` Prefix to add to column numbers when no header, e.g. 'X' for X0, X1, ... mangle_dupe_cols : boolean, default ``True`` - Duplicate columns will be specified as 'X.0'...'X.N', rather than 'X'...'X'. + Duplicate columns will be specified as 'X', 'X.1'...'X.N', rather than 'X'...'X'. Passing in False will cause data to be overwritten if there are duplicate names in the columns. @@ -548,7 +548,7 @@ these names so as to prevent data overwrite: pd.read_csv(StringIO(data)) There is no more duplicate data because ``mangle_dupe_cols=True`` by default, which modifies -a series of duplicate columns 'X'...'X' to become 'X.0'...'X.N'. If ``mangle_dupe_cols +a series of duplicate columns 'X'...'X' to become 'X', 'X.1',...'X.N'. If ``mangle_dupe_cols =False``, duplicate data can arise: .. code-block :: python diff --git a/pandas/io/parsers.py b/pandas/io/parsers.py index acb7d00284693..150fccde81a60 100755 --- a/pandas/io/parsers.py +++ b/pandas/io/parsers.py @@ -114,7 +114,7 @@ prefix : str, default None Prefix to add to column numbers when no header, e.g. 'X' for X0, X1, ... mangle_dupe_cols : boolean, default True - Duplicate columns will be specified as 'X.0'...'X.N', rather than + Duplicate columns will be specified as 'X', 'X.1', ...'X.N', rather than 'X'...'X'. Passing in False will cause data to be overwritten if there are duplicate names in the columns. dtype : Type name or dict of column -> type, default None