Pandas: Selecting DataFrame rows between two dates (Datetime Index) : <p>I have a Pandas DataFrame with a DatetimeIndex and one column <code>MSE Loss</code>
the index is formatted as follows: </p>

<pre><code>DatetimeIndex(['2015-07-16 07:14:41', '2015-07-16 07:14:48',
           '2015-07-16 07:14:54', '2015-07-16 07:15:01',
           '2015-07-16 07:15:07', '2015-07-16 07:15:14',...]
</code></pre>

<p>It includes several days.</p>

<p>I want to select all the rows (all times) of a particular days without specifically knowing the actual time intervals. 
For example: Between <code>2015-07-16 07:00:00</code> and <code>2015-07-16 23:00:00</code></p>

<p>I tried the approach outlined here: <a href="https://stackoverflow.com/questions/29370057/select-dataframe-rows-between-two-dates">here</a></p>

<p>But <code>df[date_from:date_to]</code></p>

<p>outputs:</p>

<pre><code>KeyError: Timestamp('2015-07-16 07:00:00')
</code></pre>

<p>So it wants exact indices. Furthermore, I don't have a <code>date</code>column. Only an index with the dates.</p>

<p>What is the best way to select a whole day by just providing a date <code>2015-07-16</code> and then how could I select a specific time range within a particular day?</p>
