I have a data frame in python, and I want to do a simple calculation on row level. How can can I do it in Python?
Current Table
| product ct | cost1 | cost2 | cost3 |
|---|---|---|---|
| 1000 | 10 | 100 | 20 |
| 2000 | 200 | 100 | 30 |
Calculation Concept
| product ct | cost1 | cost2 | cost3 |
|---|---|---|---|
| 1000 | 10/1000 | 100/1000 | 20/1000 |
| 2000 | 200/2000 | 100/2000 | 30/2000 |
Wanted Output
| product ct | cost1 | cost2 | cost3 |
|---|---|---|---|
| 1000 | 0.01 | 0.1 | 0.02 |
| 2000 | 0.1 | 0.05 | 0.015 |
20/1000=0.020?axisparameter