What is the faster way to count the number of entries in a data frame?

Viewed 8779

I have a data frame df that contains around 1 Gb of data. Why the command df.count() takes a relatively long time to complete, while df.filter(...) is much faster? Is there any better way to estimate the number of entries in df that is faster than df.count()'

1 Answers
Related