Yeah, I just dislike the gratuituous multiplicity of ways to do the same thing.
-- John On Jun 6, 2014, at 9:55 AM, Stefan Karpinski <[email protected]> wrote: > Since all three can be indexed the same way, it seems like that should be a > minimal annoyance, no? > > On Friday, June 6, 2014, John Myles White <[email protected]> wrote: > The thing that annoys me about arrays is that we arguably need to accept both > vectors and 1-row matrices as inputs. > > -- John > > On Jun 6, 2014, at 9:20 AM, Stefan Karpinski <[email protected]> wrote: > >> See also https://github.com/JuliaStats/DataFrames.jl/issues/585. Using a >> tuple may make more sense, but it probably wouldn't hurt to allow an array >> as well. >> >> On Friday, June 6, 2014, John Myles White <[email protected]> wrote: >> If someone wants to submit a PR to allow adding a tuple as a row to a >> DataFrame, I’ll merge it. >> >> — John >> >> On May 28, 2014, at 7:43 AM, John Myles White <[email protected]> >> wrote: >> >>> I’m happy with using tuples since that will make it easier to construct >>> DataFrames from iterators. >>> >>> — John >>> >>> On May 27, 2014, at 11:37 PM, Tomas Lycken <[email protected]> wrote: >>> >>>> I like it - but maybe that wasn't so hard to guess I would ;) >>>> >>>> // T >>>> >>>> On Tuesday, May 27, 2014 10:11:15 PM UTC+2, Jacques Rioux wrote: >>>> Let me add a thought here. I also think that adding a row to a dataframe >>>> should be easier. However, I do not think that an array would be the best >>>> container to represent a row because array members must all be of the same >>>> type which brings up Any as the only options in your example. >>>> >>>> I think that appending or pushing a tuple with the right types could be >>>> made to work. >>>> >>>> So it would be >>>> >>>> julia> push!(psispread, (1.0,0.1,:Fake)) >>>> >>>> or >>>> >>>> julia> append!(psispread, (1.0,0.1,:Fake)) >>>> >>>> since >>>> >>>> julia> typeof((1.0, 0.1, :fake)) >>>> (Float64,Float64,Symbol) >>>> >>>> Note, I am not saying that this works now but that it could be made to >>>> work by adding the corresponding method to either function. It seems it is >>>> the right construct. >>>> >>>> Any thoughts? >>> >> >
