Closed
Description
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