# I might have missed this but why is \`head(df::AbstractDataFrame)\` deprecated?

**URL:** <https://discourse.julialang.org/t/i-might-have-missed-this-but-why-is-head-df-abstractdataframe-deprecated/27988>\
**Category:** Data\
**Created:** [August 26, 2019, 7:42am UTC](https://discourse.julialang.org/t/i-might-have-missed-this-but-why-is-head-df-abstractdataframe-deprecated/27988 "2019-08-26T07:42:53Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 26, 2019, 3:17pm UTC](https://discourse.julialang.org/t/i-might-have-missed-this-but-why-is-head-df-abstractdataframe-deprecated/27988/26 "2019-08-26T15:17:32Z")

</div>

FWIW, I think that

1. `first` is a bad pun here: `DataFrame`s _per se_ are not iterable (one has to go through the Tables.jl interface to get a row iterator),

2. it is not really a good idea to combine the extraction of the first row (a `DataFrameRow`) and the first `n` rows (a `DataFrame`) in a single interface function; that’s like a function sometimes returning a matrix, sometimes a vector,

3. one should not necessarily introduce a function for either of these, but think about the purpose: the user usually just wants a preview of the dataframe without looking at the whole thing; so just make `Base.show` print the first and last 10-10 rows or so (currently I think it is 20-20). For the rest, there are the shiny new `Base.getindex` accessors.

That said, I think these things are the decision of the package maintainers, and the best place to discuss them is in issues. It is great to solicit input from users, but interfaces need a single architect, or possibly a small team of 2-3 individuals, but not more.

---

_[View the full topic](https://discourse.julialang.org/t/i-might-have-missed-this-but-why-is-head-df-abstractdataframe-deprecated/27988)._
