Skip to content

Instantly share code, notes, and snippets.

View stephenbnicar's full-sized avatar

Stephen Nicar stephenbnicar

View GitHub Profile
@stephenbnicar
stephenbnicar / create_time_array.jl
Last active April 20, 2020 22:25
Create TimeArray from DataFrame
# Construct TimeArray from DataFrame
# Assumes DataFrame `datadf` with 213 observations
using TimeSeries
dates = collect(Date(1954, 12, 1):Dates.Month(3):Date(2007, 12, 1))
datadf.timestamp = dates
datats = TimeArray(datadf, timestamp = :timestamp)