You asked many questions in one post so it is hard to filter them out. I understand that your main question is how to define a function that would take parameters for filtering.
You can do it as follows:
myFilter(lower, upper, target) = x -> lower <= x - target <= upper
and now you can write:
julia> filter(:Col1 => myFilter(0.5, 2, 1), df)
2×2 DataFrame
Row │ Col1 Col2
│ Int64 String
─────┼───────────────
1 │ 2 B
2 │ 3 C