I have the following DataFrame (df):
DataFrame
df
import numpy as np import pandas as pd df = pd.DataFrame(np.random.rand(10, 5))
How about:
df.insert(0, 'mean', df.mean(1))
http://pandas.pydata.org/pandas-docs/stable/dsintro.html#column-selection-addition-deletion