Skip to content

df.icol([0]) fails when df has non-unique column labels #2228

Closed
@ghost

Description

df=DataFrame([[1,2,3],[4,5,6]],columns=['a','b','b'])
df.icol([0])

pandas/pandas/core/index.pyc in get_indexer(self, target, method, limit)
    747 
    748         if not self.is_unique:
--> 749             raise Exception('Reindexing only valid with uniquely valued Index '
    750                             'objects')
    751 

Exception: Reindexing only valid with uniquely valued Index objects

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions