-
Notifications
You must be signed in to change notification settings - Fork 370
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
add filter and subset to documentation #2900
Conversation
- when using `.` (`getpropery`) notation (`df.A`), | ||
- when a single row is selected using an integer (`df[1, [:A, :B]]`) | ||
- when `view` or `@view` is used (e.g. `@view df[1:3, :A]`). | ||
|
||
More details on copies, views, and references can be found | ||
in the [`getindex` and `view`](@ref) section. | ||
|
||
An alternative approach to row subsetting in a data frame is to use | ||
[`filter`](@ref), [`filter!`](@ref), [`subset`](@ref), or [`subset!`](@ref) |
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.
Are you sure we should advertise filter
now that we have subset
? The version taking a function is slow due to type instability, and the other one is similar to subset
.
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.
filter
is a bit faster. It is also easier to use in simple cases as you do not have to do broadcasting or using ByRow
wrapper. But we can discuss this of course.
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.
OK. But then at least maybe don't show the pair syntax with filter
? Better only show it for functions which interpret it the same way (subset
, transform
...).
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.
You mean that at this stage of the tutorial it would be too confusing to discuss it? In this case I would remove filter
and only describe subset
and just add a comment that there is also filter
and that the reader can check it in the documentation. OK?
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.
Sure.
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.
ok - updated
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Co-authored-by: Milan Bouchet-Valat <[email protected]>
Thank you! PS. Julia is easier than English 😄. |
This is a long standing missing part of the docs.