Sunday, 29 September 2013

Pandas dataframe column multiplication

Pandas dataframe column multiplication

What if , you hae 2 df's to multiply using selected columns , and store
the result in a new column for example df1 AAPL IBM GOOG XOM
transaction_amount 2011-01-10 16:00:00 1500 0 0 0
df2 [[ 340.99 143.41 614.21 72.02] [ 340.18 143.06 616.01 72.56]
i want to multiply , aapl in df1 with 340.99 in df2 , and store the result
in transaction_amount.

No comments:

Post a Comment