human
pandas dataframe create new columns and fill with calculated values from same df
assistant
Here is some code to create new column `A_perc` in dataframe `df` with row values equal to the value in column `A` divided by the value in column `sum`

df['A_perc'] = df['A'] / df['sum']

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.