-
Notifications
You must be signed in to change notification settings - Fork 53
Change getrows -> subset #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also adds a generic implementation of subset for column-oriented tables and row-oriented tables that are AbstractVector. Adds implementation and tests for DictRowTable/DictColumnTable.
Codecov Report
@@ Coverage Diff @@
## main #292 +/- ##
==========================================
+ Coverage 94.94% 95.08% +0.13%
==========================================
Files 7 7
Lines 673 692 +19
==========================================
+ Hits 639 658 +19
Misses 34 34
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
return ColumnsRow(cols, inds) | ||
else | ||
ret = view === true ? _map(c -> Base.view(c, inds), cols) : _map(c -> c[inds], cols) | ||
return DictColumnTable(schema(cols), ret) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a special case someone can pass CartesianIndex
as inds
- do we want to handle it in the ColumnsRow
case or error on it here?
return DictRow(x.names, x.values[st]), st + 1 | ||
end | ||
|
||
function subset(x::DictRowTable, inds; view::Union{Bool,Nothing} = nothing) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar comments as above to inds
apply here
Also adds a generic implementation of subset for column-oriented tables
and row-oriented tables that are AbstractVector. Adds implementation and
tests for DictRowTable/DictColumnTable.