-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
[TST]: Add test for duplicate keys in concat #36556
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
Conversation
Test failure seems unrelated |
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
pandas/tests/reshape/test_concat.py
Outdated
# GH: 20816 | ||
series_list = [pd.Series({"a": 1}), pd.Series({"b": 2}), pd.Series({"c": 3})] | ||
result = pd.concat(series_list, keys=keys, verify_integrity=integrity) | ||
tuples = [(first, second) for first, second in zip(keys, ["a", "b", "c"])] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this could be simplified.
tuples = list(zip(keys, ["a", "b", "c"]))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, thank you very much
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor comments, overall LGTM.
pandas/tests/reshape/test_concat.py
Outdated
@pytest.mark.parametrize( | ||
("keys", "integrity"), | ||
[ | ||
(["red"] * 3, False), | ||
(["red", "blue", "red"], False), | ||
(["red", "blue", "red"], True), | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there a plan to follow the same exact parametrization as in the referenced github issue?
I would suggest to have these tests with verify_integrity=True/False
for all keys
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not mentioned as a problem, so I think that was the reason I did not add it. But was more than 4 weeks ago, so I am not quite sure. Added it now.
� Conflicts: � pandas/tests/reshape/test_concat.py
can you merge master and ping on green. |
@jreback green |
thanks! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Added a test