This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
Adds code to make concatenating dataframes columnwise in the result builder default #321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why this change? because if you are doing indicator variable stuff, maybe you don't want to be explicit about them, instead you want to concatentate the columns created without knowing about them. Seems like a reasonable pattern on first glance.
This code is backwards compatible with current users, and just enables one to have dataframes in the output.
All it does is that it flattens the dataframe, and then ensures there's no duplicate column definitions. I added tests for this for this case -- this is all on the assumption that the indexes can be merged/used for the outer join (which is the current
behavior).
For the future, we probably want some flexibility with respect
to "joins" and how things are stitched together since you could
envisage some use cases where people want to inner join between
things --- but until there's a common pattern/need, I think
we should just keep thinking about what should be first class within Hamilton,
and what we get people to do themselves.
Changes
How I tested this
Notes
Checklist