Skip to content
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

Support _DF (or something) for full DataFrame access #86

Closed
tshort opened this issue Jan 30, 2018 · 4 comments
Closed

Support _DF (or something) for full DataFrame access #86

tshort opened this issue Jan 30, 2018 · 4 comments

Comments

@tshort
Copy link
Contributor

tshort commented Jan 30, 2018

We used to have this "hidden" feature where you could use _DF to access the whole DataFrame (or SubDataFrame in a group operation). It is occasionally nice. I think it got coded out in #73.

@piever
Copy link

piever commented Feb 26, 2018

I've been playing with this in JuliaDBMeta and I think the nicest is to use _ (just like what Query does, as well as the proposed new anonymous function syntax). It could actually be a non-hidden feature and make the _I_ syntax less necessary as one can just do _[expr] which is even shorter.

@tshort
Copy link
Contributor Author

tshort commented Feb 26, 2018

Interesting on the JuliaDBMeta approach. I'm curious if you run into stumbling blocks with _. BTW, great to see JuliaDBMeta. I'm looking forward to using JuliaDB more, and having JuliaDBMeta will make it nicer!

@piever
Copy link

piever commented Feb 26, 2018

_ works pretty well as it is warned against in Julia's normal syntax so it doesn't really appear in normal code.
For now I'm making _ be the whole DataFrame for "column based macros" and the whole row as a NamedTuple for "row based macros". Ideally it should also be the appropriate subdataframe when working with grouping data but I haven't figured out the grouping part yet (JuliaDB grouping API is already quite powerful, it's not too obvious how to improve on it...).

@pdeffebach
Copy link
Collaborator

Closed in favor of #229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants