Say I have a DataFrame
call it one
like this:
non_multiply_col col_1 col_2
A Name 1 3
and a dict
like this call it two
:
{'col_1': 4, 'col_2': 5}
is there a way that I can multiply all rows of one
by the values in two
for the columns as defined by two
's keys so the result would be:
non_multiply_col col_1 col_2
A Name 4 15
I tried using multiply
, but I'm not really looking to join on anything specific. Maybe I'm not understanding how to use multiply
correctly.
Thanks