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

left-join loses row #6

Open
michaelballantyne opened this issue Nov 29, 2023 · 0 comments
Open

left-join loses row #6

michaelballantyne opened this issue Nov 29, 2023 · 0 comments

Comments

@michaelballantyne
Copy link

Hi there! I'm not sure if anybody is still maintaining this, but I seem to have run into a bug.

#lang racket
(require sawzall)
(define df (column-df [handle1 (vector "a" #f "c")]
                      [handle2 (vector "f" "g" "d")]))
(show (left-join (row-df [handle1] "a") df "handle1"))

I expect the program above to produce a result like

┌───────┬───────┐
│handle1│handle2│
├───────┼───────┤
│a      │f      │
└───────┴───────┘

but instead I get an empty dataframe.

It seems as though this only happens when the key I'm using in the query, here the "a", is the smallest key in the df I'm joining on, and when there is a #f value somewhere in the column. That is,

(left-join (row-df [handle1] "c") df "handle1")

and

(left-join (row-df [handle2] "d") df "handle2")

Thanks for the nice library!

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

1 participant