title: Is there a way to slice dataframe based on index in pyspark?
body: <p>
  In python or R, there are ways to slice DataFrame using index. </p>
  
  <p>For example, in pandas:</p>
  
  <pre class="lang-python prettyprint-override"><code>df.iloc[5:10,:]
  </code></pre>
  
  <p>Is there a similar way in pyspark to slice data based on location of rows?</p>