1

I want to divide each cell of every column by the cell of one particular column in the same row. For example, given the dataframe:

A  B  C    D
6  9  4    2
4  5  11   3
8 16  12   8

I want to divide the values of A, B and C by the value in D of the same row. It should produce the output:

     A     B    C    D
     3    4.5   2    2
     1.3  1.6  3.6   3
     1     2   1.5   8

Thanks in advance.

toothsie
  • 245
  • 3
  • 10

0 Answers0