title: Pandas: why does DataFrame.apply(f, axis=1) call f when the DataFrame is empty?
body: <p>Why does Pandas' <code>DataFrame.apply</code> method call the function being applied when the <code>DataFrame</code> is empty?</p>
  
  <p>For example:</p>
  
  <pre><code>&gt;&gt;&gt; import pandas as pd
  &gt;&gt;&gt; df = pd.DataFrame({"foo": []})
  &gt;&gt;&gt; df
  Empty DataFrame
  Columns: [foo]
  Index: []
  &gt;&gt;&gt; x = []
  &gt;&gt;&gt; df.apply(x.append, axis=1)
  Series([], dtype: float64)
  &gt;&gt;&gt; x
  [Series([], dtype: float64)] # &lt;&lt;&lt; why was the apply callback called with an empty row?
  </code></pre>