This post is tested under Julia v1.6.1 and DataFrames v1.2.0.

Base.findfirst() will do the job.

Let’s look at a simple example.

using DataFrames
a = repeat(‘a’:‘z’)
b = repeat(14:26, outer = 2)
df = DataFrame(:A => a, :B => b)
julia> df 26×2 DataFrame …