df = pd.DataFrame({'a' : np.random.randn(10),
'b' : np.random.randn(10),
'c' : np.random.randn(10)})
log_sum = np.log(np.abs(df["a"] + df['b'] + df['c']))
print log_sum
df.assign(log_sum=log_sum)
df.head()
I get the error:
AttributeError: 'DataFrame' object has no attribute 'assign'
df['log_sum] = log_sum