FWIW, I think that
-
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), -
it is not really a good idea to combine the extraction of the first row (a
DataFrameRow
) and the firstn
rows (aDataFrame
) in a single interface function; that’s like a function sometimes returning a matrix, sometimes a vector, -
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 newBase.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.