title: How to assign date quarters to integer values
body: <p>I have a dataset that includes a date column consisting of the following:</p>
  <pre><code>date
  0.25
  0.50
  0.75
  1.00
  1.25
  1.50
  1.75
  2.00
  2.25
  (etc)
  </code></pre>
  <p>This indicates yearly quarters.
  What I am trying to do is convert each quarter to have a corresponding value, 0.25 being the first quarter, 0.50 being the second and so on.</p>
  <p>What the outcome would look like is a new column with values 1:4 for each year's quarter.
  Something like:</p>
  <pre><code>date     quarter
  0.25      1
  0.50      2
  0.75      3
  1.00      4
  1.25      1
  1.50      2
  1.75      3
  2.00      4
  (etc)
  </code></pre>
  <p>I know this could be done a long way (the dreaded for loop) but I am hoping a more succinct bit of code is possible. Thanks</p>