Change unpack
to avoid colname -> true
mystery
#621
Labels
Projects
unpack
to avoid colname -> true
mystery
#621
A rather sophisticated user found the current behaviour of
unpack
difficult to understand, despite it's detailed (but possibly deficient) docstring.I also find it annoying to include
_ -> true
to pick up all remaining columns for the last return value when this is what I want 90% of the time anyway.Finally, the current design is inconsistent with
partition
: there you specifyn - 1
fractions to getn
return values, whereasunpack
is requiringn
filters forn
return values.I propose that
unpack(data, filters...; kwargs...)
return what, under the current implementation, is returned byunpack(data, filters..., _ -> true; kwargs...)
. That is, the last return value is always "everything left over".So, for example, if I have a table - with columns
:a
,:b
,:c
and:d
- and I want to unpack column:b
asy
and the rest asX
then the new syntax would beIf instead
X
should exclude:d
(ie, include only:a
and:c
) then I would doThe text was updated successfully, but these errors were encountered: