title: Convert a column of timestamps into periods in pandas
body: <p>I have a column of timestamps that need to be converted into period ('Month'). e.g.</p>
  <pre><code>1985-12-31 00:00:00 to 1985-12
  </code></pre>
  <p>Pandas has a <code>.to_period()</code> function, but:</p>
  <ul>
  <li><a href="https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.to_period.html?highlight=datetimeindex" rel="nofollow noreferrer"><code>pd.DatetimeIndex.to_period</code></a> only works on a timestamp index, not column. So you can only have a period index, but not a period column?</li>
  <li>and that function only work if timestamps are the only index, i.e. not if timestamps are part of a multIndex.</li>
  </ul>
  <p>Anyway how do I use this on an arbitary Pandas column, not just a tiemstamp index or period index?</p>