Closed fabboe closed 6 hours ago
can u post your sample frame construction at the top of the issue (so it's easily copy-past able)
@fabboe yeh all of these should not be allowed. However, the detection code is a bit tricky. As it will try to figure out if df.ix[x,y]
actually means df.ix[(x,y)]
(in the general case). IOW, if someone really means a tuple and just didn't pass it way (its a bit TOO flexible IMHO), but this is a bit tricky to change.
These would need some tests in tests/test_indexing.py
ix has been removed in the meantime so I'm not sure if there any alignment issues here anymore so closing
more or less understandable, probably both should not work though.
but then, using the same indexing, the setting operation works, unpacking the tuple into the correct columns, as one would use the correct list selector
df.ix[10,['b','ch']]
ordf.loc[10,['b','ch']]
For .ix setting should throw the same error as for retrieving? For .loc setting should throw an error as you should expect to set a tuple to a single column?
Is this wanted behavior?
P.S.: New to advanced / multi-index slicing, my searches didn't bring up that very issue despite the fact that all issues around this indexing seem somehow related.