**df**

```
order_date    Month Name   Year   Days  Data
2015-12-20     Dec         2014    1     3
2016-1-21      Jan         2014    2     3
2015-08-20     Aug         2015    1     1 
2016-04-12     Apr         2016    4     1

and so on

```

**Code:**

```
df = df.groupby(["Year", "Month Name"], as_index=False)["days"].agg(['min', 
'mean'])
df3 = (df.groupby(["Year", "Month Name"], as_index=False) 
["Data"].agg(['count']))
merged_df=pd.merge(df3, df, on=['Year','Month Name'])

```

I have a groupby output as below

```
                    Min Mean    Count
Year    Month Name                  
2015    Aug          2    11      200
        Dec          5    13      130
        Feb          3    15      100
        Jan          4    20      123
        May          1    21      342
        Nov          2    12      234
 2016   Apr          1    10      200
        Dec          2    12      120
        Feb          2    13      200
        Jan          2    24      200
        Sep          1    25      220

```

**Issue:**

Basically **I am getting output of groupby sorted by Month Name starting from A to Z**, So I am getting April, August, December, Feb etc......rather than Jan, Feb ....till Dec etc. **How to get output sorted by Month number.**

I **need output like 2016, Jan, Feb ....Dec then 2017, Jan , Feb, Mar till Dec**

Please help if there is merging of 2 dfs. I have just presented a simplified code here(real code is different, I need to merge both and then only I can work)