DataFrame.
count
Returns the number of rows in this DataFrame.
DataFrame
New in version 1.3.0.
Changed in version 3.4.0: Supports Spark Connect.
Number of rows.
Examples
>>> df = spark.createDataFrame( ... [(14, "Tom"), (23, "Alice"), (16, "Bob")], ["age", "name"])
Return the number of rows in the DataFrame.
>>> df.count() 3