Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Time Series Analysis with Python Cookbook

You're reading from  Time Series Analysis with Python Cookbook

Product type Book
Published in Jun 2022
Publisher Packt
ISBN-13 9781801075541
Pages 630 pages
Edition 1st Edition
Languages
Concepts
Author (1):
Tarek A. Atwan Tarek A. Atwan
Profile icon Tarek A. Atwan

Table of Contents (18) Chapters

Preface Chapter 1: Getting Started with Time Series Analysis Chapter 2: Reading Time Series Data from Files Chapter 3: Reading Time Series Data from Databases Chapter 4: Persisting Time Series Data to Files Chapter 5: Persisting Time Series Data to Databases Chapter 6: Working with Date and Time in Python Chapter 7: Handling Missing Data Chapter 8: Outlier Detection Using Statistical Methods Chapter 9: Exploratory Data Analysis and Diagnosis Chapter 10: Building Univariate Time Series Models Using Statistical Methods Chapter 11: Additional Statistical Modeling Techniques for Time Series Chapter 12: Forecasting Using Supervised Machine Learning Chapter 13: Deep Learning for Time Series Forecasting Chapter 14: Outlier Detection Using Unsupervised Machine Learning Chapter 15: Advanced Techniques for Complex Time Series Index Other Books You May Enjoy

Plotting time series data with interactive visualizations using hvPlot

In this recipe, you will explore the hvPlot library to create interactive visualizations. hvPlot works well with pandas DataFrames to render interactive visualizations with minimal effort. You will be using the same closing_price.csv dataset to explore the library.

Getting ready

You can download the Jupyter notebooks and datasets needed from the GitHub repository. Please refer to the Technical requirements section of this chapter.

How to do it…

  1. Start by importing the libraries needed. Notice that hvPlot has a pandas extension, which makes it more convenient. This will allow you to use the same syntax as in the previous recipe:
    import pandas as pd
    import hvplot.pandas 
    import hvplot as hv
    closing_price_n = closing_price.div(closing_price.iloc[0])

When plotting using pandas, you use the .plot() method, for example, closing_price_n.plot(). Similarly, hvPlot allows you to render an interactive...

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 $15.99/month. Cancel anytime}