-
Notifications
You must be signed in to change notification settings - Fork 373
Closed
Description
I think the following should maybe work
julia> vnt = [(a = 1, b = (c = 2, d = 3)), (a = 4, b = (c = 5, d = 6))];
julia> df = DataFrame(vnt)
2×2 DataFrame
Row │ a b
│ Int64 NamedTup…
─────┼───────────────────────
1 │ 1 (c = 2, d = 3)
2 │ 4 (c = 5, d = 6)
julia> transform(df, :b => AsTable)
2×3 DataFrame
Row │ a b b_AsTable
│ Int64 NamedTup… AsTable
─────┼──────────────────────────────────────────────────────────
1 │ 1 (c = 2, d = 3) AsTable(NamedTuple{(:c, :d), Tup…
2 │ 4 (c = 5, d = 6) AsTable(NamedTuple{(:c, :d), Tup…
I think maybe this and transform(df, :b => [:x, :y]) should work, given that transform(df, :b => :bb) works.