Reputation: 2602
Defining a custom name joining certain previously defined strings like so:
df[:join([Str1,Str2,"_",Str3])] = zeros(length(df[:Str1]))
Returns the following error:
MethodError: objects of type Symbol are not callable
I understand that join
doesn't work like that. Is it possible to convert join([Str1,Str2,"_",Str3])
to a variable?
Upvotes: 0
Views: 121
Reputation: 1540
You can concatenate strings with the star * operator
field_name = "Str1" * "Str2" *"_"* "Str3"
or you can do it with string function
field_name = string("Str1","Str2","_","Str3")
Upvotes: 1