human
Adding calculated column(s) to a dataframe in pandas
assistant
Here is some code to use operations like max/min within a row to a dataframe 'd' in pandas

d.apply(lambda row: min([row['A'], row['B']]) - row['C'], axis=1)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.