Suppose i have the data set below. I'm trying to use a pivot table and add a calculated field just like in excel(i.e. Cost/Sales). Here's what i have so far
pd.pivot_table(index="Month",values=["Cost","Sales"] aggfunc='sum')
Month       Type        Cost        Sales
March       A           5           1
June        B           10          2
March       C           10          3
