title: How to create train dataset and test dataset separately in sklearn?
body: <p>I have a fixed training dataset file <code>train.csv</code> and another test dataset file <code>test.csv</code>. I know <code>train_test_split()</code> method in sklearn can do split work. But I want to create 2 datasets seperately with each dataset from exactly each file.</p>
  
  <p>I have tested</p>
  
  <pre><code># The X,Y and X_, Y_ following are training and test samples/labels (dataframes)
  trainX, testX, trainY, testY = train_test_split( X, Y, test_size = 0)
  trainX_, testX_, trainY_, testY_ = train_test_split( X_, Y_, test_size = 1.0)  
                                   # not accepted parameter
  # ...
  dtree = tree.DecisionTreeClassifier(criterion="gini")
  dtree.fit(trainX, trainY)
  ...
  Y_pred = dtree.predict(testX_)
  </code></pre>
  
  <p>and take <code>trainX, trainY</code> to train, take <code>testX_, testY_</code> to predict.<br>
   However, <code>train_test_split()</code> method doesn't accept <code>test_size=1.0</code>, leading to a failure.</p>
  
  <p>So what's the right way to create training and test datasets separately?</p>