On Sunday, March 29, 2015 at 1:06:29 PM UTC-4, Milan Bouchet-Valat wrote:
>
> Le dimanche 29 mars 2015 à 09:46 -0700, Philip Tellis a écrit :
>
> As to my actual problem, what I have is a DataFrame with two columns, one
> a DataArray{UTF8String, 1} and the other a DataArray{Int64, 1}, and I need
> to concatenate the two columns, but I can't do this because the * operator
> does not work with UTF8String & Int64. I suppose one option is for me to
> just cast the Int64 to a string in my SQL query that produces the
> dataframe.
>
> Well, you don't need to overload convert to do that. One of the many
> solutions, assuming a and b are the two columns:
> df[:c] = ASCIIString[string(r[:a]) * r[:b] for r in eachrow(df)]
>
Using eachrow() ended up being quite slow, slow I decided to change it to
a string in the SQL query itself, and that made concatenation easier,
however now the DataType has changed from DataArray{UTF8String, 1} to
DataArray{Any, 1}. Any idea why this would happen? I'm starting a new
thread about this with more details.