title: Python Pandas data_range
body: <p>I'm trying to get every month between a given date range using data_range function in pandas. However, if I set the end the date to be the last date of a month, it's returning an extra month for me. How can I fix this?</p>
  <pre><code>[In]: pd.date_range(*(pd.to_datetime(['01/01/2020', '03/30/2020']) + pd.offsets.MonthEnd()), freq='M')
  </code></pre>
  <p>This returns no problem:</p>
  <pre><code>[Out]: DatetimeIndex(['2020-01-31', '2020-02-29', '2020-03-31'], dtype='datetime64[ns]', freq='M')
  </code></pre>
  <p>However if I change the end date to be '03/31/2020', it returns:</p>
  <pre><code>[Out]: DatetimeIndex(['2020-01-31', '2020-02-29', '2020-03-31', '2020-04-30'], dtype='datetime64[ns]', freq='M')
  </code></pre>
  <p>What I'm looking for is to make both '01/01/2020' to '03/30/2020' and '01/01/2020' to '03/31/2020' return the same output, which is ['2020-01-31', '2020-02-29', '2020-03-31'].</p>
  <p>Thank you.</p>