title: How to get all rows of a month irrespective of year in a pandas time series?
body: <p>I was trying out time series analysis with pandas data frames and found that there were easy ways to select specific columns like all the rows of an year, between two dates, etc.</p>
  
  <p>For example, consider</p>
  
  <pre><code>ind = pd.date_range('2004-01-01', '2019-08-13')
  data = np.random.randn(len(ind))
  df = pd.DataFrame(d, index=ind)
  </code></pre>
  
  <p>Here, we can select all the rows between and including the dates '2014-01-23' and '2014-06-18' with</p>
  
  <pre><code>df['2014-01-23':'2014-06-18']
  </code></pre>
  
  <p>and all the rows of the year '2015' with just</p>
  
  <pre><code>df['2015']
  </code></pre>
  
  <p>Is there a similar way to select all the rows belonging to a specific month but for <em>all</em> years?</p>
  
  <p>I found ways to get all the rows of a particular month <em>and</em> a particular year with syntax like</p>
  
  <pre><code>df['01-2015']  #all rows of January 2015
  </code></pre>
  
  <p>I was hoping pandas would have a way with simple syntax to get all rows of a month irrespective of the year. Does such a way exist?</p>