There is a function in Pandas that calculates the shape of my DataFrame which eventually is the result like
[total number of rows, total number of columns]
I have the following function that I can use in PySpark to get the shape of my DataFrame:
print((df.count(), len(df.columns)))
How do I do the same in Scala? Is this also an efficient way to do it like this for larger datasets?