You can also use the DataFrames documentation to form a DataFrame that is grouped with these values:
x = [1,2,2,3,5,6,1,2,9,2,1,6,4,2]
y = [0,0,0.1,0.1,0.2,0.3,0.4,0.5,0.5,0.6,0.7,0.8,0.9,1]
df = DataFrame(scores1=x, normalized_len=y)
gb=groupby(df, :normalized_len)
println(combine(gb, :scores1 => mean))
Output:
11×2 DataFrame
Row │ normalized_len scores1_mean
│ Float64 Float64
─────┼──────────────────────────────
1 │ 0.0 1.5
2 │ 0.1 2.5
3 │ 0.2 5.0
4 │ 0.3 6.0
5 │ 0.4 1.0
6 │ 0.5 5.5
7 │ 0.6 2.0
8 │ 0.7 1.0
9 │ 0.8 6.0
10 │ 0.9 4.0