title: Pandas How to group by month and year using dt
body: <p>I am just wondering how to group by both year and month using pandas.series.dt.</p>
  
  <p>The code below groups by just year, but how would I add a further filter to group by month as well. </p>
  
  <pre><code>Data = {'Date':['21.10.1999','30.10.1999','02.11.1999','17.08.2000','09.10.2001','14.07.2000'],'X': [10,20,30,40,50,60],'Y': [5,10,15,20,25,30]}
  
  df = pd.DataFrame(Data)
  
  #Convert to pandas date time
  df['Date'] = pd.to_datetime(df['Date'])
  
  #Obtain dataframe dtypes
  print(df.dtypes)
  
  print(df)
  print(df.groupby(df['Date'].dt.year).sum())
  </code></pre>