pydata/pandas — pull request #7770 by onesandzeroes (2014-07-16 23:51:25+00:00)
Title: BUG: Fix for passing multiple ints as levels in `DataFrame.stack()` (#7660)

The specific case that came up in #7660 (and originally in #7653) seems easy enough to fix, so I've covered that in the PR. I feel like this raises a few other potential problems though, e.g.:

* If the list of level numbers is not in order, is there any sensible way to deal with them? I've sorted the level list in my fix, as that seems like the most straightforward way of making sure that when you do each stack, it's only the level numbers higher than the current that are affected. This might produce undesired results though, so maybe we should just raise a `ValueError` if the level numbers aren't sorted?
* I'm not sure how to extend this to deal with negative level numbers.