title: Cyclical dates in pandas
body: <p>I have a pandas DF which looks like this:
  [dataframe image]</p>
  <p><img src="https://i.stack.imgur.com/Ft8gx.png" alt="1" /></p>
  <p>And I want to add a date column here which goes from '2019-01-01' to '2019-12-01' since each row here is a month's observation. Is there a simple command that can get this job done? So far I have tried</p>
  <pre><code>pd.date_range(start='2019-01-01', end='2020-01-01', freq='M')
  </code></pre>
  <p>but this throws an error saying:</p>
  <blockquote>
  <p>Length of values (12) does not match length of index (6876)</p>
  </blockquote>
  <p>I am looking for something that looks like:</p>
  <pre><code>state1   district1   2019-01-01
  state1   district1   2019-02-01
  ...
  state1   district1   2019-12-01
  state1   district2   2019-01-01
  state1   district2   2019-02-01
  ...
  </code></pre>
  <p>Even though I know this is a possible solution, I strongly want to avoid splitting this into several 12 row data frames and (left) joining the date column to each of them.</p>