Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sortheader() with duplicate column names overlays values #392

Closed
bmaggard opened this issue Oct 14, 2016 · 1 comment · Fixed by #611
Closed

sortheader() with duplicate column names overlays values #392

bmaggard opened this issue Oct 14, 2016 · 1 comment · Fixed by #611
Assignees
Labels
Bug It must work in all situations, but this failed
Milestone

Comments

@bmaggard
Copy link
Contributor

import petl as etl
t1 = etl.wrap([
    ['id', 'foo', 'bar', 'baz'],
    ['a', 1, 2, 3],
    ['b', 4, 5, 6]])
t1.sortheader()
bar baz foo id
2 3 1 a
5 6 4 b
t2 = etl.wrap([
    ['id', 'foo', 'foo', 'foo'],
    ['a', 1, 2, 3],
    ['b', 4, 5, 6]])
t2.sortheader()
foo foo foo id
1 1 1 a
4 4 4 b
@alimanfoo
Copy link
Collaborator

Thanks @bmaggard, it would be good if possible to fix this so that sorting of columns with the same name is stable and doesn't overwrite data.

@juarezr juarezr added the Bug It must work in all situations, but this failed label Sep 24, 2020
@arturponinski arturponinski self-assigned this Feb 3, 2022
@arturponinski arturponinski added this to the v1.7.8 milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug It must work in all situations, but this failed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants