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

Add column lookup with Base.getproperty? #1336

Closed
ararslan opened this issue Dec 30, 2017 · 1 comment · Fixed by #1406
Closed

Add column lookup with Base.getproperty? #1336

ararslan opened this issue Dec 30, 2017 · 1 comment · Fixed by #1406

Comments

@ararslan
Copy link
Member

Once this package requires 0.7 at a minimum, we can define column lookup in terms of getproperty in addition to getindex, so that one can access a column x of a DataFrame df as df.x in addition to df[:x].

We could consider a full replacement, but continuing to allow df[:x] permits fetching multiple columns at a time via df[:, [:x, :y, :z]]. I'm not sure how that would translate to the getproperty syntax.

@nalimilan
Copy link
Member

Agreed. It would make sense to couple this to a port to NamedTuple (#1335), in particular since filter would then pass a NamedTuple (which supports the dot syntax) to the user-provided predicate.

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