Commit 296ba95c authored by Michel Juillard's avatar Michel Juillard
Browse files

clean references to Periods features

parent 2b1129e6
...@@ -13,14 +13,14 @@ end; ...@@ -13,14 +13,14 @@ end;
function TimeDataFrame(dataframe::AbstractDataFrame, frequency::Periods.Frequency, firstperiod) function TimeDataFrame(dataframe::AbstractDataFrame, frequency::Periods.Frequency, firstperiod)
data = dataframe data = dataframe
continuous = true continuous = true
data.Periods = [Periods(firstperiod + i - 1, 0, Periods.Year) for i in 1:dataframe.nrow] data.Periods = [Period(firstperiod + i - 1, 0, Year) for i in 1:dataframe.nrow]
TimeDataFrame(dataframe, true, frequency) TimeDataFrame(dataframe, true, frequency)
end end
function TimeDataFrame(filename::String, frequency::Periods.Frequency, firstperiod) function TimeDataFrame(filename::String, frequency::Frequency, firstperiod)
data = DataFrame(CSV.File(filename)) data = DataFrame(CSV.File(filename))
continuous = true continuous = true
data.periods = [Periods.SimplePeriod(firstperiod + i - 1, 0, Periods.Year) for i in 1:nrow(data)] data.periods = [Period(firstperiod + i - 1, 0, Year) for i in 1:nrow(data)]
TimeDataFrame(data, true, frequency) TimeDataFrame(data, true, frequency)
end end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment