Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Time Series Analysis

You're reading from   Practical Time Series Analysis Master Time Series Data Processing, Visualization, and Modeling using Python

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781788290227
Length 244 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Avishek Pal Avishek Pal
Author Profile Icon Avishek Pal
Avishek Pal
PKS Prakash PKS Prakash
Author Profile Icon PKS Prakash
PKS Prakash
Arrow right icon
View More author details
Toc

Resampling time series data

The technique of resmapling is illustrated using a time series on chemical concentration readings taken every two hours between 1st January 1975 and 17th January 1975. The dataset has been downloaded from http://datamarket.com and is also available in the datasets folder of this book's GitHub repo.

We start by importing the packages required for running this example:

from __future__ import print_function 
import os 
import pandas as pd 
import numpy as np 
%matplotlib inline 
from matplotlib import pyplot as plt 

Then we set the working directory as follows:

os.chdir('D:/Practical Time Series') 

This is followed by reading the data from the CSV file in a pandas.DataFrame and displaying shape and the first 10 rows of the DataFrame:

df = pd.read_csv('datasets/chemical-concentration-readings.csv') 
print('Shape of the dataset...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image