Here is my code:
df1.pivot_table(index=["Unit", "Grade"],values = ["Unit", "QTY","ORDER_NUM", "ORDER ID"], aggfunc={'Cost': 'sum' ,'QTY':'sum', "ORDER_NUM":'count',"ORDER ID":'count'})
I want to get a count of the unique order numbers and order id. Using 'count' is not giving me a unique count. How do i do this?