Let say
df = DataFrame(a=[1])
Row │ a
│ Int64
─────┼───────
1 │ 1
We have
- Tried to combine data and make a new column holding arrays
combine(df, :a => x->[1,2])
Row │ a_function
│ Int64
─────┼────────────
1 │ 1
2 │ 2
- Tried to combine data and make a new column holding tuples
combine(df, :a => x->(1,2))
Row │ a_function
│ Tuple…
─────┼────────────
1 │ (1, 2)
Why 1 doesn't work as intended, i.e. holding the whole [1,2] array in one cell instead of creating 2 rows?
I converted the array into a tuple and it worked, but I wonder why they works in so different ways.