pyspark.sql.DataFrame.count

DataFrame.count()[source]

Returns the number of rows in this DataFrame.

New in version 1.3.0.

Examples

>>> df.count()
2