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
Indexing Regression in 0.13.0 #6394
Comments
Storing lists of numpy arrays is not efficient nor really supported. which exposes how numpy creates / does not create a veiw don't do it |
I know it is inefficient, I said as much in my post on the mailing list. I don't care whether I am returned a view or a copy - I'm not trying to assign to the data. Returning a different type dependent on the order of chaining is never a desirable outcome and hence is a bug. It's certainly a regression since the example shown above worked perfectly well in pandas 0.12. |
BTW, maybe related, there is also a difference between
|
Is this really a regression? Seems strange that unsupported behavior would carry that label. I think the current 0.13 behavior makes more sense. Data frame isn't a generic blob to hold anything and everything. If you're relying on unsupported behavior then that isn't pandas' issue. I can see that @jorisvandenbossche example looks like a bug. Happy to help get around the need to store arrays inside of pandas objects. |
I fixed this in #6396; its a little bit of an odd use case and have to 'infer' a bit based on the results whether the container is actually hold a list/ndarray, but not too difficult but to @cpcloud point.....in general storing list/np.arrays INSIDE of a frame is just asking for trouble and no real reason to do it. We have talked about this from time-to-time; prob what you are looking for is either a Panel, or really a 'collection of DataFrames' that have say aligning ability. But that's not implemented. If you would like to show a realistic usecase maybe can take some ideas. |
fixed in master |
In pandas 0.12 the order you indexed a DataFrame didn't matter, which I think is the correct behaviour:
In pandas 0.13 if you index in a different order you can get a different type out which can be problematic for code expecting an array, especially because of the difference between array indexing and label indexing.
The text was updated successfully, but these errors were encountered: