DataFrame.
take
Returns the first num rows as a list of Row.
num
list
Row
Examples
>>> df.take(2) [Row(age=2, name='Alice'), Row(age=5, name='Bob')]
previous
pyspark.sql.DataFrame.tail
next
pyspark.sql.DataFrame.toDF