Skip to content

Instantly share code, notes, and snippets.

@joshuamiller
Last active January 2, 2016 15:19
Show Gist options
  • Save joshuamiller/8322930 to your computer and use it in GitHub Desktop.
Save joshuamiller/8322930 to your computer and use it in GitHub Desktop.
julia> reports["Lat"]
1130-element DataArray{Float64,1}:
40.2717
40.2661
40.2925
40.2498
40.2765
40.2704
40.2644
40.2731
40.274
40.2691
40.2619
40.2648
40.2831
40.2632
40.2577
40.2624
40.2762
40.2786
40.2541
40.2718
## Above the column is a DataArray{Float64,1}
julia> reports["End"]
1130-element DataArray{Any,1}:
2014-01-02T19:31:00 UTC
2014-01-02T19:16:00 UTC
2014-01-02T11:06:00 UTC
2014-01-02T11:00:00 UTC
2014-01-02T07:55:00 UTC
2014-01-02T02:02:00 UTC
2014-01-02T01:10:00 UTC
2014-01-01T23:23:00 UTC
2014-01-01T21:00:00 UTC
2014-01-01T15:47:00 UTC
2013-11-01T14:25:00 UTC
2013-11-01T12:40:00 UTC
2013-11-01T12:14:00 UTC
2013-11-01T10:43:00 UTC
2013-11-01T10:13:00 UTC
2013-11-01T10:00:00 UTC
2013-11-01T07:45:00 UTC
2013-11-01T07:37:00 UTC
2013-11-01T04:30:00 UTC
2013-11-01T00:44:00 UTC
## Everything in this column is a DateTime, but it's a DataArray{Any,1}
##
## How would I change that?
@johnmyleswhite
Copy link

With the latest (not released) DataArrays code, you could do:

reports["End"] = convert(DataVector{DateTime}, reports["End"])

This currently isn't fully supported because of a subtle bug in Julia.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment