pandas create new column based on values from other columns / apply a function of multiple columns, row-wise

OK, two steps to this – first is to write a function that does the translation you want – I’ve put an example together based on your pseudo-code: You may want to go over this, but it seems to do the trick – notice that the parameter going into the function is considered to be … Read more