get mean for all columns in a dataframe and create a new dataframe
<p>I have a  dataframe with only numeric values and I want to calculate the mean for every column and create a new dataframe.<br>
The original dataframe is indexed by a datetimefield. The new dataframe should be indexed by the same field as original dataframe with a value equal to last row index of original dataframe.</p>

<p>Code so far</p>

<pre><code>mean_series=df.mean()     
df_mean= pd.DataFrame(stddev_series)
df_mean.rename(columns=lambda x: 'std_dev_'+ x, inplace=True)
</code></pre>

<p>but this gives an error</p>

<pre><code>df_mean.rename(columns=lambda x: 'std_mean_'+ x, inplace=True)
TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('S21') dtype('S21') dtype('S21')
</code></pre>