Skip to content

Changes in .ix behavior that break backwards compat #6063

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

Closed
twiecki opened this issue Jan 24, 2014 · 6 comments
Closed

Changes in .ix behavior that break backwards compat #6063

twiecki opened this issue Jan 24, 2014 · 6 comments

Comments

@twiecki
Copy link
Contributor

twiecki commented Jan 24, 2014

It seems like there was major refactoring of the .ix[] indexing in 0.13 that breaks backwards compatibility in some ways.

E.g. .ix[row][col_name] = x used to work but doesn't. Sometimes .ix[row, col_name] = x also doesn't work and I have to use .loc[row, col_name] = x instead although the docs state that .ix[] just falls back to either .loc or .iloc.

I'm changing most of my code but I guess I'm just wondering whether that was made explicit as I can't find it in the release notes or if unittests failed to catch it?

@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

see here and related: #6058

fixed in 0.13.1

your options for 0.13 are to upgrade numpy to 1.8
or use ix

you are doing chained indexing assignment. not guaranteed to work. (it will work in 0.13.1, but is in general a bad idea)

ix will always work, if you have a specific case that it doesn't, put up as a new issue

@jreback jreback closed this as completed Jan 24, 2014
@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

@twiecki appreciate the bug reports though.....

believe me wish had caught this before 0.13...but that's why we have 0.13.1...had lots of moving parts

keep reporting!

@twiecki
Copy link
Contributor Author

twiecki commented Jan 24, 2014

@jreback Appreciate the hard work you guys are doing. I suppose the success of pandas is also a burden in the way that if something breaks many people start complaining ;).

@twiecki
Copy link
Contributor Author

twiecki commented Jan 24, 2014

There's another thing I noticed for which I'm happy to open up an issue if you don't know about it.

I noticed that that numpy-style access breaks sometimes under 0.13. While I haven't been able to pin-point the issue, calls like pylab.hist(-df.ix[row, col_name]) fail with some x[0] index error and I have to use pylab.hist(-df.ix[row, col_name]).values. Only sometimes though and I haven't been able to create a reproducible case.

@jreback
Copy link
Contributor

jreback commented Jan 24, 2014

hmm...ok...

do a try except around those statemetns and if it breaks, then either save a pickle/csv of the frame if you can
so can take a look (and dump whatever info you can)....

its the reproduce that is important as you know :)

@twiecki
Copy link
Contributor Author

twiecki commented Jan 27, 2014

OK, issue opened at #6127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants