Skip to content

Allow predicates in unpack to act on string names instead of symbols#1044

Draft
ablaom wants to merge 2 commits intodevfrom
strings-in-unpack
Draft

Allow predicates in unpack to act on string names instead of symbols#1044
ablaom wants to merge 2 commits intodevfrom
strings-in-unpack

Conversation

@ablaom
Copy link
Member

@ablaom ablaom commented Feb 12, 2026

This PR resolves #1043.

After this PR:

julia> table = DataFrame(x=[1,2], y=['a', 'b'], z=[10.0, 20.0], w=["A", "B"])
2×4 DataFrame
 Row │ x      y     z        w      
     │ Int64  Char  Float64  String 
─────┼──────────────────────────────
   11  a        10.0  A
   22  b        20.0  B

julia> YW, _ = unpack(table, in(["y", "w"]); string_names=true)
julia> YW
2×2 DataFrame
 Row │ y     w      
     │ Char  String 
─────┼──────────────
   1 │ a     A
   2 │ b     B

@ablaom ablaom marked this pull request as draft February 12, 2026 22:03
@ablaom
Copy link
Member Author

ablaom commented Feb 12, 2026

I'm thinking there is a better solution. See the discussion at #1043 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Have unpack support String names for the columns

1 participant