title: Is there a way to get a list of monthly datetime intervals [(timestart_of_month1, timeend_of_month1), ...] using pandas?
body: <p>The only thing I could achieve is to get intervals between start dates of months:</p>
  <pre><code>import pandas as pd
  pd.interval_range(
      start=pd.Timestamp('2021-01-01 00:00:00'), 
      end=pd.Timestamp('2021-03-31 23:59:59'), 
      freq='MS'
  )
  
  # 2021-01-01 00:00:00 - 2021-02-01 00:00:00
  # 2021-02-01 00:00:00 - 2021-03-01 00:00:00
  </code></pre>
  <p>And to get intervals between end dates of months:</p>
  <pre><code>import pandas as pd
  pd.interval_range(
      start=pd.Timestamp('2021-01-01 00:00:00'), 
      end=pd.Timestamp('2021-03-31 23:59:59'), 
      freq='MS'
  )
  
  # 2021-01-31 00:00:00 - 2021-02-28 00:00:00
  # 2021-02-28 00:00:00 - 2021-03-31 00:00:00
  </code></pre>
  <p>But all I want is to get simple monthly intervals:</p>
  <pre><code># 2021-01-01 00:00:00 - 2021-01-31 23:59:59
  # 2021-02-01 00:00:00 - 2021-02-28 23:59:59
  # 2021-03-01 00:00:00 - 2021-03-31 23:59:59
  </code></pre>
  <p>I want to achieve it in a very neat way without subtracting one second, etc.</p>