Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
DynareJulia
TimeDataFrames.jl
Commits
296ba95c
Commit
296ba95c
authored
Mar 04, 2020
by
Michel Juillard
Browse files
clean references to Periods features
parent
2b1129e6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/TimeDataFrames.jl
View file @
296ba95c
...
...
@@ -13,14 +13,14 @@ end;
function
TimeDataFrame
(
dataframe
::
AbstractDataFrame
,
frequency
::
Periods
.
Frequency
,
firstperiod
)
data
=
dataframe
continuous
=
true
data
.
Periods
=
[
Period
s
(
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
)
end
function
TimeDataFrame
(
filename
::
String
,
frequency
::
Periods
.
Frequency
,
firstperiod
)
function
TimeDataFrame
(
filename
::
String
,
frequency
::
Frequency
,
firstperiod
)
data
=
DataFrame
(
CSV
.
File
(
filename
))
continuous
=
true
data
.
periods
=
[
Period
s
.
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
)
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment