Skip to content

Conversation

@jreback
Copy link
Contributor

@jreback jreback commented Apr 25, 2013

BUG: GH3457 to_csv writing duplicate columns incorrectly

closes #3455, #3457

…orrect order

BUG: GH3457 to_csv writing duplicate columns incorrectly
@ghost
Copy link

ghost commented Apr 25, 2013

I'll redo #3458 after you merge this.

@jreback
Copy link
Contributor Author

jreback commented Apr 25, 2013

ok...any other tests that we should run against this?

jreback added a commit that referenced this pull request Apr 25, 2013
BUG: GH3455 Duplicate indexes with getitem will return items in the correct order
@jreback jreback merged commit 67ad556 into pandas-dev:master Apr 25, 2013
@ghost
Copy link

ghost commented Apr 25, 2013

I don't think #3457 is fixed by this. I'm happy to just leave it to raise an exception if tried,
engine='python' is just a fallback.

In [11]: df= mkdf(10, 3)
    ...: df.columns = ['a','a','b']
    ...: df.to_csv("/tmp/1.csv",engine='python')
    ...: !cat "/tmp/1.csv"
R0,a,a,b
R_l0_g0,R0C1,R0C1,R0C2
R_l0_g1,R1C1,R1C1,R1C2
R_l0_g2,R2C1,R2C1,R2C2
R_l0_g3,R3C1,R3C1,R3C2
R_l0_g4,R4C1,R4C1,R4C2
R_l0_g5,R5C1,R5C1,R5C2
R_l0_g6,R6C1,R6C1,R6C2
R_l0_g7,R7C1,R7C1,R7C2
R_l0_g8,R8C1,R8C1,R8C2
R_l0_g9,R9C1,R9C1,R9C2

edit: ok, we'll just let #3458 have it raise a warning, and users should transition to the new csv writer code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fancy indexing with dupe columns yields unexpected ordering

1 participant