I know the feeling, i get around hard to remember things like this by 
creating a snippet for it in Sublime text... that way I at least have a 
place to go to find them!

On Thursday, March 13, 2014 4:13:45 AM UTC-4, David van Leeuwen wrote:
>
> Hi, 
>
> I've run into this and similar things many times, and somehow each time it 
> takes me a lot of time to come up with such a solution again.  Don't ask me 
> why I can't remember this, I must be getting old.  Would it make sense to 
> define a
>
> string(da::DataArray)
>
> to do just that, within DataArrays.jl? 
>
> On Wednesday, March 12, 2014 6:06:59 PM UTC+1, Jason Solack wrote:
>>
>> that worked, thank you very much
>>
>> On Tuesday, March 11, 2014 9:51:49 PM UTC-4, John Myles White wrote:
>>>
>>> Here's one way to do that: UTF8String[string(x) for x in df[:A]] 
>>>
>>>  -- John 
>>>
>>> On Mar 11, 2014, at 6:48 PM, Jason Solack <jays...@gmail.com> wrote: 
>>>
>>> > no, i'm sorry.  I have a vector that's eltype is Float64, it has 
>>> values that i'd like to replace with the words that describe their values. 
>>> right now when assigning them i'm getting errors since it's type is Float 
>>> and it needs to be string. 
>>> > 
>>> > so i'd like to convert the first column in the dataframe to an eltype 
>>> of string so i can replace the numeric values with strings 
>>> > 
>>> > On Tuesday, March 11, 2014 9:37:56 PM UTC-4, John Myles White wrote: 
>>> > I'm not totally sure what you mean. A column of a DataFrame is a 
>>> vector, so one natural way to convert the column to a string would be to 
>>> join all of the entries using join: 
>>> > 
>>> > using DataFrames 
>>> > df = DataFrame(A = 1:10) 
>>> > join(df[:A], "::") 
>>> > 
>>> > Is that what you're looking for? 
>>> > 
>>> >  -- John 
>>> > 
>>> > On Mar 11, 2014, at 6:35 PM, Jason Solack <jays...@gmail.com> wrote: 
>>> > 
>>> > > So this seems like silly question, but i'm looking to convert a 
>>> column in a dataframe to a string and I don't see how to do that. 
>>> > > 
>>> > > Any help? 
>>> > > 
>>> > > Thank you! 
>>> > > 
>>> > > Jason 
>>> > 
>>>
>>>

Reply via email to