# World age error when constructing dataframe

**URL:** <https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069>\
**Category:** General Usage\
**Tags:** bug\
**Created:** [July 26, 2017, 1:12am UTC](https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069 "2017-07-26T01:12:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![YongHee-Kim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yonghee-kim/32/5965_2.png) [@YongHee-Kim](https://discourse.julialang.org/u/YongHee-Kim)\
**Post date:** [July 26, 2017, 1:12am UTC](https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069/1 "2017-07-26T01:12:14Z")

</div>

I get world age error when I’m constructing some form of dataframe.  
(I’m on Julia Version 0.6.0 Commit 903644385b\* (2017-06-19 13:05 UTC) with Windows OS)

here is my example code to reproduce this error

```julia
using DataFrames

playerid = sample(collect(1:2154), 1000)
gachaid = sample(collect(1:39), 1000)
weights = rand(1000)

df = DataFrame(gachaid = gachaid, playerid = playerid, weights = weights)

```

which creates dataframe fine. but throws following error message

> Error displaying DataFrames.DataFrame: MethodError: no method matching size(::DataArrays.DataArray{UInt16,1})  
> The applicable method may be too new: running in world age 21848, while current world is 22005.  
> Closest candidates are:  
> size(::DataArrays.DataArray) at C:\Users\kimyonghee.julia\v0.6\DataArrays\src\dataarray.jl:168 (method too new to be called from this world context.)  
> size(::AbstractArray{T,N}, !Matched::Any) where {T, N} at abstractarray.jl:29  
> size(::Any, !Matched::Integer, !Matched::Integer, !Matched::Integer…) where N at abstractarray.jl:30  
> …

thanks!

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [July 26, 2017, 4:26pm UTC](https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069/2 "2017-07-26T16:26:20Z")

</div>

Where does `sample` come from? I tried the code below, and it worked fine on Julia 0.6, OSX

```julia
using DataFrames, StatsBase

playerid = rand(collect(1:2154), 1000)
gachaid = rand(collect(1:39), 1000)
weights = rand(1000)

df = DataFrame(gachaid = gachaid, playerid = playerid, weights = weights)

```

---

<div class="post-metadata">

**Author:** ![piever](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/piever/32/1815_2.png) [@piever](https://discourse.julialang.org/u/piever)\
**Post date:** [July 26, 2017, 7:09pm UTC](https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069/3 "2017-07-26T19:09:57Z")

</div>

Are you on Juno? I had a similar issue and it’s only an error in displaying. If you run with `Shift Enter` the following code at the same time it gives error. If instead you evaluate `using DataFrames` and the rest separately it works fine.

---

<div class="post-metadata">

**Author:** ![YongHee-Kim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yonghee-kim/32/5965_2.png) [@YongHee-Kim](https://discourse.julialang.org/u/YongHee-Kim)\
**Post date:** [July 28, 2017, 1:07am UTC](https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069/4 "2017-07-28T01:07:49Z")

</div>

Yes, you are right. I’m on Juno and I was running whole code block with `Shift Enter` throws world age error.

Running it by line works fine. Thanks!

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [July 28, 2017, 9:28am UTC](https://discourse.julialang.org/t/world-age-error-when-constructing-dataframe/5069/5 "2017-07-28T09:28:03Z")

</div>

This has been fixed with  
[https://github.com/JunoLab/Atom.jl/pull/96](https://github.com/JunoLab/Atom.jl/pull/96)
