Extracting row of DataFrame directly as NamedTuple?

Also DataFrameRow behaves as a mutable NamedTuple so most of the time you should be probably fine without a conversion to a NamedTuple.

Finally you can easily convert a DataFrame into a vector of NamedTuples:

julia> df = DataFrame(rand(4,5))
4×5 DataFrame
│ Row │ x1       │ x2       │ x3       │ x4        │ x5       │
│     │ Float64  │ Float64  │ Float64  │ Float64   │ Float64  │
├─────┼──────────┼──────────┼──────────┼───────────┼──────────┤
│ 1   │ 0.770968 │ 0.560951 │ 0.866555 │ 0.415779  │ 0.592464 │
│ 2   │ 0.540743 │ 0.130965 │ 0.753823 │ 0.0484519 │ 0.29774  │
│ 3   │ 0.58207  │ 0.251234 │ 0.839407 │ 0.198445  │ 0.64087  │
│ 4   │ 0.380907 │ 0.639851 │ 0.219417 │ 0.499336  │ 0.549085 │

julia> Tables.rowtable(df)
4-element Array{NamedTuple{(:x1, :x2, :x3, :x4, :x5),NTuple{5,Float64}},1}:
 (x1 = 0.770968397202171, x2 = 0.5609505403103048, x3 = 0.8665553646186814, x4 = 0.4157788264006259, x5 = 0.5924636685911997)
 (x1 = 0.5407429997531747, x2 = 0.13096466013137342, x3 = 0.7538231604145154, x4 = 0.048451924943883506, x5 = 0.2977397808434288)
 (x1 = 0.582069831435476, x2 = 0.25123376929999, x3 = 0.8394071952281461, x4 = 0.1984448483279182, x5 = 0.6408697174304954)
 (x1 = 0.38090740524465483, x2 = 0.6398505002703665, x3 = 0.21941720362172124, x4 = 0.49933624062983384, x5 = 0.5490849304331029)