Using findfirst with for multiple values and columns in a Dataframe?

Yes, certainly. That was the form I used to do a sort of self-test on syntax.
The appropriate form for the problem posed is the following

 searchsortedfirst(eachrow(df2), (dates=Date("2024-02-24"),times=Time("15:00:00")), by=r->(r.dates,r.times))

To further clarify the doubt on the issue of the empty collection:

julia> searchsortedfirst([],3)

Since it seems a bit related, take a look here Fastest way to fetch an index where we designed alternatives to searchsortedlast it might give you more ideas

1 Like