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

Stop using makeunique=true for grouping keys in combine #1938

Merged
merged 3 commits into from
Sep 3, 2019
Merged

Conversation

nalimilan
Copy link
Member

Instead, check whether columns with the same names as grouping keys have been returned, and throw an error if they are not equal.

This is breaking since columns named key_1, etc. won't be created, but in practice it should not be frequently used. Introducing a deprecation would be more annoying than helpful since it would require adding a keyword argument to disable adding grouping keys and force users to set it to silence
the warning, which happens in most common cases.

Fixes #1460.

Instead, check whether columns with the same names as grouping keys
have been returned, and throw an error if they are not equal.
This is breaking since columns named key_1, etc. won't be created,
but in practice it should not be frequently used. Introducing a deprecation
would be more annoying than helpful since it would require adding a keyword
argument to disable adding grouping keys and force users to set it to silence
the warning, which happens in most common cases.
To check that names are used, and not only column indices.
Copy link
Member

@bkamins bkamins left a comment

Choose a reason for hiding this comment

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

Excellent. Thank you. One small thing that could be added is a paragraph in the documentation of by and combine explaining this behavior.

@bkamins
Copy link
Member

bkamins commented Sep 3, 2019

I am OK to skip deprecation period in this case.

@bkamins bkamins added this to the 1.0 milestone Sep 3, 2019
@bkamins bkamins mentioned this pull request Sep 3, 2019
@nalimilan
Copy link
Member Author

One small thing that could be added is a paragraph in the documentation of by and combine explaining this behavior.

Good idea. I've also noticed that the same change needs to be applied to map.

@bkamins
Copy link
Member

bkamins commented Sep 3, 2019

Thank you. I am OK to merge it.

@nalimilan nalimilan merged commit 045f675 into master Sep 3, 2019
@nalimilan nalimilan deleted the nl/keys branch September 3, 2019 20:27
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.

check for preserved index column during combine
2 participants