title: Get full year data in column in Pandas
body: <p>I have a case where Full Year total is loaded into the 13th month. I have to take the total per OpNum as columns. I have shown as-is and expected outcome below.</p>
  <p>Full year data is simple sum of 12 months. I tried using group by and sum but it didn't work</p>
  <pre><code>df[FY] = df.groupby('OpNum','Year')['MTD'].sum()
  </code></pre>
  <p>ValueError: No axis named Year for object type DataFrame</p>
  <p>AS-IS DF:</p>
  <pre><code>
  OpNum   Year    month   MTD
  0   OP1 2021    1   1000
  1   OP1 2021    2   1000
  2   OP1 2021    3   1000
  3   OP1 2021    4   1000
  4   OP1 2021    5   1000
  5   OP1 2021    6   1000
  6   OP1 2021    7   1000
  7   OP1 2021    8   1000
  8   OP1 2021    9   1000
  9   OP1 2021    10  1000
  10  OP1 2021    11  1000
  11  OP1 2021    12  1000
  12  OP1 2021    13  12000
  13  OP2 2021    1   2000
  14  OP2 2021    2   2000
  15  OP2 2021    3   2000
  16  OP2 2021    4   2000
  17  OP2 2021    5   2000
  18  OP2 2021    6   2000
  19  OP2 2021    7   2000
  20  OP2 2021    8   2000
  21  OP2 2021    9   2000
  22  OP2 2021    10  2000
  23  OP2 2021    11  2000
  24  OP2 2021    12  2000
  25  OP2 2021    13  24000
  </code></pre>
  <p>Expected output :</p>
  <pre><code>
      OpNum   Year    month   MTD FY
  0   OP1 2021    1   1000    12000
  1   OP1 2021    2   1000    12000
  2   OP1 2021    3   1000    12000
  3   OP1 2021    4   1000    12000
  4   OP1 2021    5   1000    12000
  5   OP1 2021    6   1000    12000
  6   OP1 2021    7   1000    12000
  7   OP1 2021    8   1000    12000
  8   OP1 2021    9   1000    12000
  9   OP1 2021    10  1000    12000
  10  OP1 2021    11  1000    12000
  11  OP1 2021    12  1000    12000
  12  OP2 2021    1   2000    24000
  13  OP2 2021    2   2000    24000
  14  OP2 2021    3   2000    24000
  15  OP2 2021    4   2000    24000
  16  OP2 2021    5   2000    24000
  17  OP2 2021    6   2000    24000
  18  OP2 2021    7   2000    24000
  19  OP2 2021    8   2000    24000
  20  OP2 2021    9   2000    24000
  21  OP2 2021    10  2000    24000
  22  OP2 2021    11  2000    24000
  23  OP2 2021    12  2000    24000
  </code></pre>