Get the value in a column when the according to condition in another column value approximately equal

Just use a condition with a desired precision, e.g.:

julia> df1[25 .< df1.p2 .< 55, :p1]
2-element Vector{Int64}:
 10
 50

to get all rows where p2 is in [25, 55] range.