title: Pyspark random split changes distribution of data
body: <p>I found a very strange behavior with pyspark when I use <code>randomSplit</code>. I have a column <code>is_clicked</code> that takes values <code>0</code> or <code>1</code> and there are way more zeros than ones. After random split I would expect the data would be uniformly distributed. But instead, I see that the first rows in the splits are all <code>is_cliked=1</code>, followed by rows that are all <code>is_clicked=0</code>. You can see that number of clicks in the original dataframe <code>df</code> is 9 out of 1000 (which is what I expect). But after random split the number of clicks is 1000 out of 1000. If I take more rows I will see that it's all going to be <code>is_clicked=1</code> until there are no more columns like this, and then it will be followed by rows <code>is_clicked=0</code>.</p>
  <p>Anyone knows why there is distribution change after random split? How can I make <code>is_clicked</code> be uniformly distributed after split?</p>
  <p><a href="https://i.stack.imgur.com/ienHu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ienHu.png" alt="enter image description here" /></a></p>