Skip to content

Commit

Permalink
fix python asof join dispatch (#1720)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Nov 9, 2021
1 parent 9c518f7 commit a2bbd4d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions py-polars/polars/eager/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,12 @@ def join(
- "cross"
suffix
Suffix to append to columns with a duplicate name.
asof_by
join on these columns before doing asof join
asof_by_left
join on these columns before doing asof join
asof_by_right
join on these columns before doing asof join
Returns
-------
Joined DataFrame
Expand Down
8 changes: 7 additions & 1 deletion py-polars/polars/lazy/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ def join(
Allow the physical plan to optionally evaluate the computation of both DataFrames up to the join in parallel.
force_parallel
Force the physical plan to evaluate the computation of both DataFrames up to the join in parallel.
asof_by
join on these columns before doing asof join
asof_by_left
join on these columns before doing asof join
asof_by_right
join on these columns before doing asof join
# Asof joins
This is similar to a left-join except that we match on nearest key rather than equal keys.
Expand Down Expand Up @@ -535,7 +541,7 @@ def join(
if isinstance(asof_by, str):
left_asof_by_ = [asof_by]
right_asof_by_ = [asof_by]
elif isinstance(on, list):
elif isinstance(asof_by, list):
left_asof_by_ = asof_by
right_asof_by_ = asof_by

Expand Down

0 comments on commit a2bbd4d

Please sign in to comment.