pyspark.sql.DataFrame.count

DataFrame.count() → int

Returns the number of rows in this DataFrame.

Examples

>>> df.count()
2