0

LiteTable 0.6.7 Julia 0.3 Jewel0.6.4 June 0.2 Mac OSX 10.9

Hi,I have a problem at using Datavector by DataFrame package.

using DataFrames
df = DataFrame()
df["Name"] = DataVector["JohnSmith", "JaneDoe"]
df["Height"] = DataVector[73.0,68.0]
df["Weight"] = DataVector[NA,130]
df["Gender"] = DataVector["Male","Female"]

after that, julia says

no method convert(Type{DataArray{T,1}}, ASCIIString)
in getindex at array.jl:121

I could do this same script at julia 0.2 Does LightTable's plugin such as Jewel,June not accept this DataFrames function?

I tried dataeye() and other function ,but this doesn't work..

Brw, I found a similar post at google group. https://groups.google.com/forum/#!topic/julia-users/VmgmRnBCo9I

Thanks for reading.

K.I.N
  • 129
  • 1
  • 7

1 Answers1

0

It looks like you're reading very old documentation for DataArrays and DataFrames. You might want to look at more recent docs: http://juliastats.github.io/DataFrames.jl/

Here's how'd you do what you're trying to do:

using DataFrames
df = DataFrame()
df[:Name] = @data(["JohnSmith", "JaneDoe"])
df[:Height] = @data([73.0,68.0])
df[:Weight] = @data([NA,130])
df[:Gender] = @data(["Male","Female"])
John Myles White
  • 2,889
  • 20
  • 14
  • Thanks John,I had watched your video. I didnt know this is very old. https://www.youtube.com/watch?v=XRClA5YLiIc I tried your advise and everything going well now. thanks. – K.I.N Jul 13 '14 at 03:14
  • The link in this answer is dead. Documentation can now be found [here](http://dataframesjl.readthedocs.org/en/latest/). – user4235730 Dec 20 '14 at 21:17