get shape of a spark dataframe code example Example: spark df shape print((df.count(), len(df.columns)))