title: Stratified Sampling in python scikit-learn
body: <p>I want to divide my dataset into train and test sets using <strong>stratified</strong> sampling(<strong>scikitlearn</strong>).my approach is as follows :</p>
  
  <p>1) I'am reading a CSV file and loading it using <strong>pandas</strong> readCSV.so ultimately i'am storing the loaded csv in a dataframe names "dataset"</p>
  
  <pre><code>         dataset = pd.readCSV('CSV_NAME)
  </code></pre>
  
  <p>2) Now i'am applying stratified sampling as :</p>
  
  <pre><code>         train,test = train_test_split(dataset,test_size=0.20,stratify=True)
  </code></pre>
  
  <p>But it throwing the following <strong>error</strong> :</p>
  
  <pre><code>TypeError: Singleton array array(True, dtype=bool) cannot be considered a valid collection.
  </code></pre>
  
  <p>So please suggest me the correct way of doing to it.</p>