So basically I have a dataframe with two rows: the number of users on the first and the conversion rate for them on the second, like the table shown here:
df.show()
+---------+----------+----------+----------+
| month | company_1| company_2| company_3|
+---------+----------+----------+----------+
| 02-2022 | 1000 | 5000 | 500 |
| 02-2022 | 0.08 | 0.13 | 0.45 |
+---------+----------+----------+----------+
I need to multiply users by conversion rate, so I can have the number of clients who bought something in that company each month, like the table shown here:
df.show()
+---------+----------+----------+----------+
| month | company_1| company_2| company_3|
+---------+----------+----------+----------+
| 02-2022 | 80 | 650 | 225 |
+---------+----------+----------+----------+
I don't know how I can do that, could you guys help me please?
Thanks!