pyspark.sql.DataFrame.count

DataFrame.count()[source]

Returns the number of rows in this DataFrame.

>>> df.count()
2

New in version 1.3.