title: Combine month name and year in a column pandas python
body: <p>df</p>
  
  <pre><code>Year   Month Name    Avg
  2015    Jan           12
  2015    Feb           13.4
  2015    Mar           10     
  ...................
  2019   Jan           11
  2019   Feb           11
  </code></pre>
  
  <p><strong>Code</strong></p>
  
  <pre><code>df['Month Name-Year']= pd.to_datetime(df['Month Name'].astype(str)+df['Year'].astype(str),format='%b%Y')
  </code></pre>
  
  <p>In the dataframe, df, the groupby output avg is on keys month name and year. So month name and year are actually multilevel indices. I want to create a third column Month Name Year so that I can do some operation (create plots etc) using the data.</p>
  
  <p>The output I am getting using the code is as below:</p>
  
  <pre><code>   Year   Month Name    Avg        Month Name-Year
     2015    Jan           12       2015-01-01
     2015    Feb           13.4     2015-02-01
     2015    Mar           10       2015-03-01
      ...................
      2019   Nov           11       2019-11-01
      2019   Dec           11       2019-12-01
  </code></pre>
  
  <p>and so on.</p>
  
  <p>The output I want is 2015-Jan, 2015-Feb etc in Month Name-Year column...or I want 2015-01, 2015-02...2019-11, 2019-12 etc (only year and month, no days).</p>
  
  <p>Please help</p>