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