-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pandas): preserve RHS values in asof join when column names collide
`pandas.merge_asof` loses information when any of the grouping or predicate columns share the same name. It outputs a single column (e.g. `time`) instead of two columns (`time`, `time_right`). Ibis attempts to recover the now "missing" column, but previously, we were simply creating a copy of the LHS `time` column and then renaming it to be `time_right`. This behavior also occurred in grouping columns if the names match. Now, we add default join suffixes to predicates and groups and rename the corresponding columns before the `merge_asof`.
- Loading branch information
Showing
2 changed files
with
48 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters