title: How to floor a date to the first date of that month?
body: <p>I have a pandas DataFrame with index column = <code>date</code>.</p>
  
  <p>Input:</p>
  
  <pre><code>            value
  date    
  1986-01-31  22.93
  1986-02-28  15.46
  </code></pre>
  
  <p>I want to floor the date to the first day of that month</p>
  
  <p>Output:</p>
  
  <pre><code>            value
  date    
  1986-01-01  22.93
  1986-02-01  15.46
  </code></pre>
  
  <p>What I tried:</p>
  
  <pre><code>df.index.floor('M')
  ValueError: &lt;MonthEnd&gt; is a non-fixed frequency
  </code></pre>
  
  <p>This is potentially because the df is generated by 
  <code>df = df.resample("M").sum()</code> (The output of this code is the input at the beginning of the question)</p>
  
  <p>I also tried <code>df = df.resample("M", convention='start').sum()</code>. However, it does not work.</p>
  
  <p>I know in R, it is easy to just call <code>floor(date, 'M')</code>.</p>