Pivot table in pandas

 pivot2 = pd.pivot_table(union, 

                        index=['YM','Channel Name','SKU_x','Invoice Type'], 

                        values=['Document No_','Total HL'], 

                        aggfunc={'Document No_':pd.Series.nunique

                                ,'Total HL': np.sum})

Comments

Most searched

WHERE or IF function in Numpy