Skip to content

Conversation

drizk1
Copy link
Member

@drizk1 drizk1 commented Aug 5, 2025

fixes #90 with minimal change to parsing_function

julia> df = DataFrame(ID1 = ["ID_1", "ID_23", "ID_456"])
3×1 DataFrame
 Row │ ID1    
     │ String 
─────┼────────
   1 │ ID_1
   2 │ ID_23
   3 │ ID_456

julia> @chain df begin 
                  @mutate(across(ID1, s -> split.(s, "_")))
                  @mutate(ID = [x[2] for x in ID1_function])
              end
3×3 DataFrame
 Row │ ID1     ID1_function                    ID        
     │ String  Array…                          SubStrin… 
─────┼───────────────────────────────────────────────────
   1 │ ID_1    SubString{String}["ID", "1"]    1
   2 │ ID_23   SubString{String}["ID", "23"]   23
   3 │ ID_456  SubString{String}["ID", "456"]  456

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.

Add support for array comprehensions
1 participant