This is my code and I can't figure out what's wrong with it.
Edit: It says name 'count' not defined
df1.pivot_table(index=["Unit", "Grade"],values = ["Cost", "Quantity","Transaction_num", "Order_num"], aggfunc={'Cost':[np.sum],'Quantity':[np.sum], "Transaction_num":[count],"Order_num":[count]})
I want a sum of total cost and total quantity but I want a distinct count of transaction number and order number.