How to select half the rows from a DataFrame column and return an array of values from another column

You’re almost there, right?

using StatsBase

selected = sample(1:size(C,1), size(C,1) ÷ 2, replace=false)
A = C[selected, :Team]
B = C[selected, :Opponent]
3 Likes