In the example below, I expect [1,2,2,3] instead of [1,2,3,4].
left = pa.table({"left": [10, 20, 30, 40], "key": [1, 1, 1, 1]})
right = pa.table(
{
"right": [9, 12, 30, 41],
"key": [1, 1, 1, 1],
"value": [1, 2, 3, 4],
}
)
assert left.join_asof(
right, on="left", by="key", tolerance=-10, right_on="right", right_by="key"
) == pa.table(
{
"left": [10, 20, 30, 40],
"key": [1, 1, 1, 1],
"value_right": [1, 2, 3, 3], # Should be [1,2,2,3]
}
)
Describe the enhancement requested
I would like to do a
join_asofthat would exclude exact matches.This is supported in pandas https://pandas.pydata.org/docs/reference/api/pandas.merge_asof.html
In the example below, I expect [1,2,2,3] instead of [1,2,3,4].
Component(s)
Python