Skip to content
Advertisement

Tag: args

pandas, apply with args which are dataframe row entries

I have a pandas dataframe ‘df’ with two columns ‘A’ and ‘B’, I have a function with two arguments and I would like to apply it row-by-row to df using the ‘apply’ function but I get the error whats happening here, it seems it takes df[‘A’] as the whole series! not just the row entry from that series as required.

Advertisement