I want to divide the revenue by volume into a pivot_table (such as a calculated Excel field), so that the average price per product of each month appears:
The code you'd like to do is more or less like this:
df.pivot_table (index= "Produto", columns= 'Mês', values= ["Receita" / "Volume"])
Mês
Produto 1 2 3 4
a 14,38 14,38
b 9,78 9,78
c 7,96
d 18,43
But pivot_table is not allowing you to divide the revenue by volume into the "values" parameter
Thanks for the help.