I have a problem, very similar to the one in this question. Where I am trying to modify a subset of rows in my dataframe.
The only difference being that instead of using values from the column itself as shown here
df.ix[df.A==0, 'B'] = df.ix[df.A==0, 'B'] / 2
I want to use a different column, let's call it C and apply a function to it and assign it to column B so something like this.
df.ix[df.A==0, 'B'] = df.ix[df.A==0, 'C'].apply(function)
But I cannot get it to behave how I expect. Any ideas?