Efficient caching/persisting

KosmaS
New Contributor III

To cache/persist an action needs to be triggered. I'm just wondering, will it make any difference if, after persisting some df, I use, for instance, take(5) instead of count()?


Will it be a bit more effective, because of sending results from 5 partitions to the driver?
Instead of calculating counts for all the partitions?