Why does apply change dtype in pandas dataframe columns
<p>I have the following dataframe:</p>

<pre><code>import pandas as pd
import numpy as np
df = pd.DataFrame(dict(A = np.arange(3), 
                         B = np.random.randn(3), 
                         C = ['foo','bar','bah'], 
                         D = pd.Timestamp('20130101')))

print(df)

   A         B    C          D
0  0 -1.087180  foo 2013-01-01
1  1 -1.343424  bar 2013-01-01
2  2 -0.193371  bah 2013-01-01
</code></pre>

<p><code>dtypes</code> for columns:</p>

<pre><code>print(df.dtypes)
A             int32
B           float64
C            object
D    datetime64[ns]
dtype: object
</code></pre>

<p>But after using <a href="http://pandas.pydata.org/pandas-docs/version/0.17.1/generated/pandas.DataFrame.apply.html" rel="noreferrer"><code>apply</code></a> they all changes to object:</p>

<pre><code>print(df.apply(lambda x: x.dtype))
A    object
B    object
C    object
D    object
dtype: object
</code></pre>

<p>Why are <code>dtypes</code> coerced to object? I thought that in <code>apply</code> only columns should be taken in account. </p>

<p><code>pandas 0.17.1</code><br>
<code>python 3.4.3</code></p>