data = [{'a': 12, 'b': 23, 'c':34, 'd': 0.1, 'e':25},
{'a':13, 'b': 26, 'c': 38, 'd': 0.02, 'e':26},
{'a':19, 'b': 28, 'c': 31, 'd': 0.04, 'e':22}
]
# Creates DataFrame.
df = pd.DataFrame(data)
a b c d e
0 12 23 34 0.10 25
1 13 26 38 0.02 26
2 19 28 31 0.04 22
I have a very large dataframe consisting of 20 cols and 20million+ rows, I would like to multiply certain columns by column d.
For example in this case I want to multiply columns a,c, and e by the percentage in column d.I would like to know what is the quickest way to do this