title: Faster way to subset a dataframe using pandas
body: <p>The full dataframe is 2.4GB. 
  Currently I am creating a boolean mask based on index and selecting a subset of dataframe.
   The index is a DateTimeIndex.
  It takes approx 10 min to get the subset dataframe . Is there a faster way to do this?
  Please see the code below for your reference.</p>
  
  <pre><code>        train_data = pd.read_pickle(self.pkl_path + '/' + "train_data.pkl")
          new_train_data = train_data[(train_data.index.date &lt;= self.end_train.date())
                                      &amp; (self.start_train.date() &lt;= train_data.index.date)]
  </code></pre>