Skip to content

Instantly share code, notes, and snippets.

@stephenbnicar
Last active April 20, 2020 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephenbnicar/2d4033e6dfcf4299a9c5134e3734cbeb to your computer and use it in GitHub Desktop.
Save stephenbnicar/2d4033e6dfcf4299a9c5134e3734cbeb to your computer and use it in GitHub Desktop.
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment