title: Rowwise max/min in pandas
body: <p>I'd like to do something like this:</p>
  
  <pre><code>df['A'] = max(0, min(df.B, df.C - df.D))
  </code></pre>
  
  <p>However, I get a <code>ValueError</code> ("the truth value of a Series is ambiguous"), which I guess means that the <code>max</code> and <code>min</code> functions are doing some boolean operations under the hood, and this doesn't distribute over the Series. I understand you can get the min/max of some set of columns by e.g.</p>
  
  <pre><code>df[['col1','col2','col3']].max(axis = 1)
  </code></pre>
  
  <p>and so I should be able to get my desired output by way of making some temporary columns with intermediate values, but I'd like a clean solution that does it directly. How does one do this without having to make extra columns for throwaway intermediate values?</p>