title: Pandas DataFrame max() and apply(max) return different values when there are missing values in the data
body: <p>I'm going through the basics of data manipulation with pandas and while working on one of the exercises I've noticed some strange behavior in the work of <code>max()</code> method when there are missing values in the data. Here is a toy example.</p>
  
  <p>First create a toy data</p>
  
  <pre><code>df = pd.DataFrame({'A': [1, np.nan], 'B': [np.nan, 1]})
  </code></pre>
  
  <p>It is a 2x2 DataFrame. The only difference between columns is that there is a missing value in the first row in the second column, and in the first column it is in the second row.</p>
  
  <pre><code>    A   B
  0   1.0 NaN
  1   NaN 1.0
  </code></pre>
  
  <p>Now I try to find maximum value in each column in different ways</p>
  
  <ol>
  <li><p>Applying <code>DataFrame.max()</code> method. </p>
  
  <pre><code>df.max()        
  </code></pre>
  
  <p>It gives the results I've expected to get</p>
  
  <pre><code>A    1.0
  B    1.0
  dtype: float64
  </code></pre></li>
  <li><p>Using <code>DataFrame.apply()</code> method and using <code>max</code> as argument to this method</p>
  
  <pre><code>df.apply(max)
  </code></pre>
  
  <p>The result is</p>
  
  <pre><code>A    1.0
  B    NaN
  dtype: float64
  </code></pre>
  
  <p>What is unexpected here is that maximum of column B is reported to be <code>NaN</code>. I assume that the cause is the <code>NaN</code> value in the first row.</p></li>
  <li><p>Using <code>DataFrame.apply()</code> method and using <code>'max'</code> as argument to this method</p>
  
  <pre><code>df.apply('max')
  </code></pre>
  
  <p>Here the results are expected.</p>
  
  <pre><code>A    1.0
  B    1.0
  dtype: float64
  </code></pre></li>
  </ol>
  
  <p>Why the result of second approach is different from the other two?</p>