Skip to content

DEPR: concat with mismatched length keys/objs #52337

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

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

jbrockmendel
Copy link
Member

objs = list(objs)
if len(keys) != len(objs):
# GH#43485
warnings.warn(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any code paths below that can be simplified once this deprecation is enforced?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. ATM we just silently truncate in the zip iteration a few lines down

@mroeschke mroeschke added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Deprecate Functionality to remove in pandas labels Apr 3, 2023
@mroeschke mroeschke added this to the 2.1 milestone Apr 3, 2023
@mroeschke mroeschke merged commit 523ab8c into pandas-dev:main Apr 3, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bugs-5 branch April 3, 2023 21:44
topper-123 pushed a commit to topper-123/pandas that referenced this pull request Apr 6, 2023
* DEPR: concat with mismatched len(keys) and len(objs)

* Fix+test iterators
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API: pd.concat with len(keys) != len(values) does not raise; intentional?
2 participants