# Asof join support in DataFrames.jl

**URL:** <https://discourse.julialang.org/t/asof-join-support-in-dataframes-jl/88445>\
**Category:** Data\
**Tags:** dataframes\
**Created:** [October 7, 2022, 8:24pm UTC](https://discourse.julialang.org/t/asof-join-support-in-dataframes-jl/88445 "2022-10-07T20:24:25Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![aplavin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aplavin/32/222056_2.png) [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Post date:** [October 8, 2022, 4:25pm UTC](https://discourse.julialang.org/t/asof-join-support-in-dataframes-jl/88445/6 "2022-10-08T16:25:42Z")

</div>

[FlexiJoins.jl](https://discourse.julialang.org/t/ann-flexijoins-jl-fresh-take-on-joining-datasets/79655) is the most general package for joining datasets, to my knowledge. It does efficient joins by predicates such as the one you need, and also supports DataFrames

> merge A and B based on (id = id, date1 \< date \< date2)

```julia
using FlexiJoins, IntervalSets
innerjoin((A, B), by_key(:id) & by_pred(:date, ∈, x -> x.date1..x.date2))

```

---

_[View the full topic](https://discourse.julialang.org/t/asof-join-support-in-dataframes-jl/88445)._
