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 a lookup function #120

Closed
johnmyleswhite opened this issue Dec 16, 2012 · 3 comments
Closed

Add a lookup function #120

johnmyleswhite opened this issue Dec 16, 2012 · 3 comments
Labels

Comments

@johnmyleswhite
Copy link
Contributor

See this example for the semantics of Pandas' lookup() function:

http://stackoverflow.com/questions/13893227/vectorized-look-up-of-values-in-pandas-dataframe

@HarlanH
Copy link
Contributor

HarlanH commented Dec 17, 2012

Hm, we'd have to do something somewhat different, because we don't have row
indexes. Something like...

lookup(from::DataFrame, index_col::Index, index_val::T1, data_col::Index)

or maybe

lookup(from::DataFrame, row_where::Dict, data_col::Index)

where row_where looks like {"Date" => "2011-02-02 00:00:00"} or even
{"Year" => 2012, "Month" => 5} to index on multiple columns. If we actually
had column or column-set hashes, getting the row could be fast.

@tshort
Copy link
Contributor

tshort commented Dec 17, 2012

They are not pulled in automatically, but there is some code in
src/indexing.jl that can index columns. I haven't checked in a while to see
if it still works. Either way, that code might be a place to look, either
to implement indexing or to generate an index on the fly.

@bkamins bkamins mentioned this issue Jan 15, 2019
31 tasks
@bkamins
Copy link
Member

bkamins commented Feb 12, 2020

We now support it via GroupedDataFrame.

@bkamins bkamins closed this as completed Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants