SyntaxFix
Write A Post
Hire A Developer
Questions
This solves the problem:
df['newcolumn'] = df.A * df.B
You could also do:
def fab(row): return row['A'] * row['B'] df['newcolumn'] = df.apply(fab, axis=1)