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

Fix unexpected behavior of .set_index() since pandas 0.21.0 #1723

Merged
merged 2 commits into from
Nov 17, 2017

Conversation

benbovy
Copy link
Member

@benbovy benbovy commented Nov 16, 2017

Copy link
Member

@shoyer shoyer left a comment

Choose a reason for hiding this comment

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

Looks great -- thank you!

@@ -136,6 +136,14 @@ def merge_indexes(
names, labels, levels = [], [], []
current_index_variable = variables.get(dim)

for n in var_names:
var = variables[n]
if ((current_index_variable is not None) and
Copy link
Member

Choose a reason for hiding this comment

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

nice: is not and != have higher precedence than and, so you could remove these nested parantheses

@benbovy benbovy changed the title fix set_index behavior using pandas 0.21.0 Fix unexpected behavior of .set_index() since pandas 0.21.0 Nov 16, 2017
Copy link
Member

@jhamman jhamman left a comment

Choose a reason for hiding this comment

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

Nice catch!

@jhamman jhamman merged commit 1a01208 into pydata:master Nov 17, 2017
@shoyer shoyer mentioned this pull request Nov 20, 2017
13 tasks
@benbovy benbovy deleted the fix_set_index branch October 25, 2019 15:07
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.

3 participants