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
bcab8edf
Commit
bcab8edf
authored
May 07, 2019
by
Rebecca Merrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing indentation
parent
7bbd7cf6
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 @
bcab8edf
...
@@ -10,9 +10,9 @@ import statistics
...
@@ -10,9 +10,9 @@ import statistics
# (single variable) series, with datetime (column 0)
# (single variable) series, with datetime (column 0)
# 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
...
@@ -98,10 +98,10 @@ print('De-differenced values ', undiff2.head())
...
@@ -98,10 +98,10 @@ print('De-differenced values ', undiff2.head())
# First let's get 2 versions of the time series:
# First let's get 2 versions of the time series:
# All values with the last 5 being actual values
# All values with the last 5 being actual values
# All values with last 5 being predicted values
# All values with last 5 being predicted values
hourly_sentiment_full_actual
=
pd
.
read_csv
(
'hourly_users_sentiment_sample.csv'
,
hourly_sentiment_full_actual
=
pd
.
read_csv
(
'hourly_users_sentiment_sample.csv'
,
index_col
=
0
,
index_col
=
0
,
parse_dates
=
True
,
parse_dates
=
True
,
squeeze
=
True
)
squeeze
=
True
)
print
(
hourly_sentiment_full_actual
.
tail
())
print
(
hourly_sentiment_full_actual
.
tail
())
indx_row_values
=
hourly_sentiment_full_actual
.
index
[
19
:
24
]
indx_row_values
=
hourly_sentiment_full_actual
.
index
[
19
:
24
]
print
(
indx_row_values
)
print
(
indx_row_values
)
...
...
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