title: Splitting data using time-based splitting in test and train datasets
body: <p>I know that <code>train_test_split</code> splits it randomly, but I need to know how to split it based on time.</p>
  <pre><code>  X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42) 
    # this splits the data randomly as 67% test and 33% train
  </code></pre>
  <p>How to split the same data set based on time as 67% train and 33% test? The dataset has a column TimeStamp.</p>
  <p>I tried searching on the similar questions but was not sure about the approach.</p>
  <p>Can someone explain briefly?</p>