Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
tutorials
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rebecca Merrett
tutorials
Commits
8d2d4f38
Commit
8d2d4f38
authored
Apr 19, 2019
by
Rebecca Merrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing indentation
parent
12bc23ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
py_time_series_example.py
Time Series/py_time_series_example.py
+6
-6
No files found.
Time Series/py_time_series_example.py
View file @
8d2d4f38
...
@@ -11,8 +11,8 @@ import statistics
...
@@ -11,8 +11,8 @@ import statistics
# as the row index
# as the row index
hourly_sentiment_series
=
pd
.
read_csv
(
'hourly_users_sentiment_subset.csv'
,
hourly_sentiment_series
=
pd
.
read_csv
(
'hourly_users_sentiment_subset.csv'
,
index_col
=
0
,
index_col
=
0
,
parse_dates
=
True
,
parse_dates
=
True
,
squeeze
=
True
)
squeeze
=
True
)
print
(
hourly_sentiment_series
.
head
())
print
(
hourly_sentiment_series
.
head
())
# Check data is indexed as DatetimeIndex
# Check data is indexed as DatetimeIndex
...
@@ -107,10 +107,10 @@ indx_row_values = hourly_sentiment_full_actual.index[19:24]
...
@@ -107,10 +107,10 @@ indx_row_values = hourly_sentiment_full_actual.index[19:24]
print
(
indx_row_values
)
print
(
indx_row_values
)
predicted_series_values
=
pd
.
Series
(
ARMA1predict_5hourly_sentiment
,
predicted_series_values
=
pd
.
Series
(
ARMA1predict_5hourly_sentiment
,
index
=
[
'2019-02-06 19:00:00'
,
index
=
[
'2019-02-06 19:00:00'
,
'2019-02-06 20:00:00'
,
'2019-02-06 20:00:00'
,
'2019-02-06 21:00:00'
,
'2019-02-06 21:00:00'
,
'2019-02-06 22:00:00'
,
'2019-02-06 22:00:00'
,
'2019-02-06 23:00:00'
])
'2019-02-06 23:00:00'
])
print
(
predicted_series_values
)
print
(
predicted_series_values
)
hourly_sentiment_full_predicted
=
hourly_sentiment_series
.
append
(
predicted_series_values
)
hourly_sentiment_full_predicted
=
hourly_sentiment_series
.
append
(
predicted_series_values
)
print
(
hourly_sentiment_full_predicted
.
tail
())
print
(
hourly_sentiment_full_predicted
.
tail
())
...
...
Write
Preview
Markdown
is supported
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