Skip to content

df.ix method changed results between 0.10.1 to 0.11.0 #3829

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
jobingr opened this issue Jun 10, 2013 · 4 comments
Closed

df.ix method changed results between 0.10.1 to 0.11.0 #3829

jobingr opened this issue Jun 10, 2013 · 4 comments
Labels
Duplicate Report Duplicate issue or pull request

Comments

@jobingr
Copy link

jobingr commented Jun 10, 2013

I have a big DataFrame where i want to to overwrite values in a given column if the values in another column is not in a list. Value to be overwritten is from the checked column. The following code gives the expected results in 0.10.1, but gives unexpected results in 0.11.0

using numpy 1.7.1

code:

df contains the original pandas DataFrame

accurate_list = ['SA EQUITY CFD', 'SA EQUITY', 'SA SSF']

x is the df of items not matching the list in its Classification

x = df[~df.Classification.isin(accurate_list)]

overwrites only incorrect Classifications

df.ix[x.index,'Industry Code'] = df['Classification']

I have been unable to recreate the error with smaller dataframes. Have double checked and the dataframe definitely has an unique index. No error message, just incorrect values written to the 'Industry Code' column

@jobingr
Copy link
Author

jobingr commented Jun 10, 2013

sorry... code got markedown applied

@jreback
Copy link
Contributor

jreback commented Jun 10, 2013

we need to see a sample that reproduces this problem...

and try on master, have been some bug fixes in this area

@jobingr
Copy link
Author

jobingr commented Jun 11, 2013

have not checked on 0.10.1 but apparently fixed there.

http://stackoverflow.com/questions/17020763/pandas-0-10-1-to-0-11-0-ix-method

@jreback
Copy link
Contributor

jreback commented Jun 11, 2013

your example is indicted in #3839 and is fixed in #3670
thanks for the report

@jreback jreback closed this as completed Jun 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Report Duplicate issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants