pyspark dataframe row number code example Example: number of rows in dataframe pyspark print((df.count(), len(df.columns)))