Make `DataFrame.head()` and `DataFrame.tail()` lazy
Open
dataframe
deprecation
enhancement
needs attention
- Dominant language
- Python
- Stars
- 13.9k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
Currently `head()` and `tail()` trigger an implicit, immediate computation. This can be surprising to users since almost all Dask methods are lazily evaluated. Instead I think `head()` and `tail()` should return a Dask DataFrame that users can then call `compute()` on like most other methods.
Since both these methods already have a `compute=` keyword that is `True` by default, I'll suggest we:
1. Deprecate the current `compute=True` default value and inform users that in the future `compute=` will default to `False`
2. After a while, change the default to `compute=False`
Contributor guide
Assessment
This issue has not been assessed yet.