I am importing an excel document and creating a dataframe, df3. I want to group by only Name
. The other uplicate data should reflect as shown in the output.
Df3 =pd.read_excel('stats')
print (df3)
Name ID Month Shift
Jon 1 Feb A
Jon 1 Jan B
Jon 1 Mar C
Mike 1 Jan A
Mike 1 Jan B
Jon 1 Feb C
Jon 1 Jan A
Output Required:
I want to have output like as below in the same format and will save in excel. Please help me on same as I'm stuck here. Note (Month must be ascending order)
Will be greatfull for help and support .