Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Obscur AttributeError when dropping on a multi-index dataframe #12078
Comments
nbonnotte
referenced
this issue
Jan 18, 2016
Closed
TST in .drop and .groupby for dataframes with multi-indexed columns #11717
|
I'm a bit confused. As I have understood the API, here On the other hand, if we consider
then
but
Here is what happens:
Does that mean that, in the API as it should be, in What should I do in my pull request? As as side note, the reason why Also, I feel the need to say that I'm sorry if it seems that I am insisting a bit on those issues about |
The difference is that when the columns are not lexsorted this doesn't work, and the error message is incorrectly propogated, and an incorrect path is taken showing an error message which doesn't make sense. So you need to see where the difference is and what is happening to the exceptions. |
jreback
added Indexing Error Reporting MultiIndex
labels
Jan 19, 2016
jreback
added this to the
Next Major Release
milestone
Jan 19, 2016
|
Oki doki, I'll do that ^^ |
|
I couldn't find any other exception that would be raised but incorrectly propagated. Except the one that shows up, of course. And this exception is raised for the reason I gave:
But maybe I'm just not looking at the right place. Am I missing something? |
|
yeh, prob just not correctly implemented. |
|
Can I correct the implementation, so that
Beware that this simple correction might change the API of both So perhaps a safer option would be to first have Let me know what I can do. |
|
I think |
|
The problem with the DataFrame arises because of the problem with the MultiIndex, as shown in my examples. What can I do to remove the obscur error message? |
|
ahh, yes, see if you can
though you may want to output a you'll have to look and see how its used elsewhere. |
nbonnotte
referenced
this issue
Jan 27, 2016
Closed
BUG in MultiIndex.drop for not-lexsorted multi-indexes, #12078 #12158
jreback
modified the milestone: 0.18.0, Next Major Release
Jan 27, 2016
nbonnotte
added a commit
to nbonnotte/pandas
that referenced
this issue
Jan 28, 2016
|
|
nbonnotte |
5e765d0
|
nbonnotte commentedJan 18, 2016
This is related to issue #11640. I have been working on a solution that I submitted in the pull request #11717, but the said solution was controversial, so I'm creating this issue to separate the problems.
I'll make a PR soon enough.