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

Implement "union" operation #1988

Open
evansd opened this issue Apr 22, 2024 · 0 comments
Open

Implement "union" operation #1988

evansd opened this issue Apr 22, 2024 · 0 comments

Comments

@evansd
Copy link
Contributor

evansd commented Apr 22, 2024

That is, it should be possible to take two event frames, extract from them a set of compatible fields (compatible in the sense of having the same types and names – possibly after renaming) and then combine these into a single event frame which contains all the rows from both.

This is the equivalent of SQL's UNION operation and similar to Pandas concat().

I don't think this would be an enormous piece of work to implement, but it wouldn't be trivial and no doubt there will be annoying edge cases which Hypothesis will find for us. Possibly the trickiest bit will be designing a sensible API.

An example of the sort of thing which could only reasonably be done with this feature would be counting the number of episodes for each patient where the events that form part of an episode could be recorded in either of two tables.

Slack thread:
https://bennettoxford.slack.com/archives/C04DVD1UQC9/p1711373571001209

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