Cleanest way to convert DataFrame row into a Vector?

I suspect that was an issue with the measurement rather than a true difference. @tecosaur how did you benchmark? Here’s what I get with Julia 1.9-beta4:

using DataFrames
using BenchmarkTools

df = DataFrame(rand(100,1000), :auto)

f(df, row) = [df[row,i] for i in 1:ncol(df)]
g(df, row) = collect(Base.Generator(i -> df[row, i], 1:ncol(df)))


julia> @btime f($df, 1);
  31.522 μs (1003 allocations: 23.62 KiB)

julia> @btime g($df, 1);
  31.086 μs (1003 allocations: 23.62 KiB)