title: How take a random row from a PySpark DataFrame?
body: <p>How can I get a random row from a PySpark DataFrame? I only see the method <code>sample()</code> which takes a fraction as parameter. Setting this fraction to <code>1/numberOfRows</code> leads to random results, where sometimes I won't get any row.</p>
  <p>On <code>RDD</code> there is a method <code>takeSample()</code> that takes as a parameter the number of elements you want the sample to contain. I understand that this might be slow, as you have to count each partition, but is there a way to get something like this on a DataFrame?</p>