title: Separate pandas dataframe using sklearn's KFold
body: <p>I had obtained the index of training set and testing set with code below.</p>
  
  <pre><code>df = pandas.read_pickle(filepath + filename)
  kf = KFold(n_splits = n_splits, shuffle = shuffle, random_state = 
  randomState)
  
  result = next(kf.split(df), None)
  
  #train can be accessed with result[0]
  #test can be accessed with result[1]
  </code></pre>
  
  <p>I wonder if there is any faster way to separate them into 2 dataframe respectively with the row indexes I retrieved.</p>