pyspark find number of rows code example Example: spark df shape print((df.count(), len(df.columns)))