title: sklearn train_test_split on pandas stratify by multiple columns
body: <p>I'm a relatively new user to <code>sklearn</code> and have run into some unexpected behavior in <code>train_test_split</code> from <code>sklearn.model_selection</code>. I have a pandas <code>dataframe</code> that I would like to split into a training and test set. I would like to <code>stratify</code> my data by at least 2, but ideally 4 columns in my <code>dataframe</code>.</p>
  <p>There were no warnings from <code>sklearn</code> when I tried to do this, however I found later that there were repeated rows in my final data set. I created a sample test to show this behavior:</p>
  <pre><code>from sklearn.model_selection import train_test_split
  a = np.array([i for i in range(1000000)])
  b = [i%10 for i in a]
  c = [i%5 for i in a]
  df = pd.DataFrame({'a':a, 'b':b, 'c':c})
  </code></pre>
  <p>It seems to work as expected if I stratify by either column:</p>
  <pre><code>train, test = train_test_split(df, test_size=0.2, random_state=0, stratify=df[['b']])
  print(len(train.a.values))  # prints 800000
  print(len(set(train.a.values)))  # prints 800000
  
  train, test = train_test_split(df, test_size=0.2, random_state=0, stratify=df[['c']])
  print(len(train.a.values))  # prints 800000
  print(len(set(train.a.values)))  # prints 800000
  </code></pre>
  <p>But when I try to <code>stratify</code> by both columns, I get repeated values:</p>
  <pre><code>train, test = train_test_split(df, test_size=0.2, random_state=0, stratify=df[['b', 'c']])
  print(len(train.a.values))  # prints 800000
  print(len(set(train.a.values)))  # prints 640000
  </code></pre>