I recently discovered pandas \"assign\" method which I find very elegant. My issue is that the name of the new column is assigned as keyword, so it cannot have spaces or das
assign expects a bunch of key word arguments. It will, in turn, assign columns with the names of the key words. That's handy, but you can't pass an expression as the key word. This is spelled out by @EdChum in the comments with this link
use insert instead for inplace transformation
df.insert(2, 'ln(A)', np.log(df.A))
df
use concat if you don't want inplace
pd.concat([df, np.log(df.A).rename('log(A)')], axis=1)