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

pd-merge outer on empty-dataset #435

Open
harold opened this issue Nov 19, 2024 · 0 comments
Open

pd-merge outer on empty-dataset #435

harold opened this issue Nov 19, 2024 · 0 comments

Comments

@harold
Copy link
Contributor

harold commented Nov 19, 2024

I'm doing a reduce to align a bunch of datasets on a shared column.

I used (ds/empty-dataset) as my initial value for the reduce, and the reducer boiled down to something like this:

analysis.core> (join/pd-merge (ds/empty-dataset)
                              (ds/->dataset {:t [0 1] :x [:a :b]})
                              {:on :t :how :outer})
Execution error at tech.v3.dataset.impl.dataset.Dataset/column (dataset.clj:306).
Column not found: :t

I think I get why that happened, and I'm not sure if that should even really work, but it was unexpected, to me.

This is how I'm working around it for now:

analysis.core> (join/pd-merge (ds/->dataset {:t []})
                              (ds/->dataset {:t [0 1] :x [:a :b]})
                              {:on :t :how :outer})
outer-join [2 2]:

| :t | :x |
|---:|----|
|  0 | :a |
|  1 | :b |
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