Skip to content

fancy indexing with dupe columns yields unexpected ordering #3455

Closed
@ghost

Description


In [16]: from pandas.util.testing import makeCustomDataframe as mkdf
    ...: df= mkdf(10, 3)
    ...: df.columns = ['a','a','b']
    ...: cols = ['b','a']
    ...: df[['b','a']].columns
Out[16]: Index([a, a, b], dtype=object)

expected to see

['b','a','a']

Once fixed, can relax format.py:CSVFormatter raising NotImplementedError()
on cols selection with dupe columns, for the new engine only. see #3457 .

edit: #3509 removed that limitation from CSVFormatter

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions