Skip to content

Conversation

@jorisvandenbossche
Copy link
Member

Closes #9463

@jreback also related to #6682 (I removed 'join compat' introduced in that PR, as this worked only for level names, and passing level=level works for both level names and integer level numbers)

@jorisvandenbossche jorisvandenbossche added this to the 0.16.0 milestone Feb 12, 2015
Copy link
Contributor

Choose a reason for hiding this comment

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

this wasn't being hit anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I understand the code, this was hit, and this fixed the issue in the PR I linked, but it only fixed it for the case when you provide real level names for level (in this case, other is given the same name, and then Index.join will automatically join on the common level name.
When passing integer number to level, setting this number as the level name does not ensure that Index.join can join it correctly, as there are no common level names.

Another option is to set here the correct level name from self that corresponds to the provided level number, but as passing level=level to join also works (for both cases) and is simpler, I took that option.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, your soln seems right/reasonable.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok! still have to add a release note

jorisvandenbossche added a commit that referenced this pull request Feb 23, 2015
BUG: binary operator method alignment with integer level (GH9463)
@jorisvandenbossche jorisvandenbossche merged commit 1050adb into pandas-dev:master Feb 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: binary operator methods (eg mul) don't handle integer level

2 participants