title: Taking max of absolute values of two df columns in python
body: <p>The questions looks very easy but I did not find a suitable intuitive answer.
  Suppose I have a df.</p>
  <p><code>df = pd.DataFrame({&quot;A&quot;: [-1,2,3], &quot;B&quot;: [-2, 8, 1], &quot;C&quot;: [-5, -6, 7]})</code></p>
  <p>I want to create a column 'D' which gives the max of absolute values between 'A' and 'B'.
  In short what I am expecting is kind of the following form.</p>
  <p><code>df[&quot;D&quot;] = (df[&quot;A&quot;].abs(), df[&quot;B&quot;].abs()).max()</code></p>
  <p>or
  <code>df[&quot;D&quot;] = max(df[&quot;A&quot;].abs(), df[&quot;B&quot;].abs())</code></p>
  <p>or
  <code>df[&quot;D&quot;] = max(abs(df[&quot;A&quot;]), abs(df[&quot;B&quot;])</code></p>
  <p>Obviously, none of them works because the syntax is taken from SAS and Excel.
  Help please.</p>