Ultimate Enterprise Data Analysis and Forecasting using Python: Leverage Cloud platforms with Azure Time Series Insights and AWS Forecast Components ... Modeling using Python (English Edition) Pandian 2024 scribd download
Ultimate Enterprise Data Analysis and Forecasting using Python: Leverage Cloud platforms with Azure Time Series Insights and AWS Forecast Components ... Modeling using Python (English Edition) Pandian 2024 scribd download
com
https://textbookfull.com/product/advanced-time-series-data-analysis-
forecasting-using-eviews-1st-edition-i-gusti-ngurah-agung/
textbookfull.com
https://textbookfull.com/product/learning-aws-design-build-and-deploy-
responsive-applications-using-aws-cloud-components-aurobindo-sarkar/
textbookfull.com
https://textbookfull.com/product/open-living-with-an-expansive-mind-
in-a-distracted-world-1st-edition-nate-klemp/
textbookfull.com
Bonhoeffer’s reception of Luther 1st Edition Dejonge
https://textbookfull.com/product/bonhoeffers-reception-of-luther-1st-
edition-dejonge/
textbookfull.com
https://textbookfull.com/product/refocus-the-films-of-william-
castle-1st-edition-murray-leeder-editor/
textbookfull.com
https://textbookfull.com/product/the-new-map-energy-climate-and-the-
clash-of-nations-first-edition-daniel-yergin/
textbookfull.com
https://textbookfull.com/product/myth-and-reality-in-the-u-s-
immigration-debate-first-edition-edition-greg-prieto/
textbookfull.com
https://textbookfull.com/product/pearson-iit-foundation-series-
physics-class-8-7th-edition-trishna-knowledge-systems/
textbookfull.com
Dynamics of Energy Environment and Economy A
Sustainability Perspective Hassan Qudrat-Ullah
https://textbookfull.com/product/dynamics-of-energy-environment-and-
economy-a-sustainability-perspective-hassan-qudrat-ullah/
textbookfull.com
Ultimate Enterprise
Data Analysis and
Forecasting using
Python
Shanthababu Pandian
www.orangeava.com
Copyright © 2023 Orange Education Pvt Ltd, AVA™
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted
in any form or by any means, without the prior written permission of the publisher, except in the case of
brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express or
implied. Neither the author nor Orange Education Pvt Ltd or its dealers and distributors, will be held
liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Orange Education Pvt Ltd has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capital. However, Orange
Education Pvt Ltd cannot guarantee the accuracy of this information. The use of general descriptive
names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the
absence of a specific statement, that such names are exempt from the relevant protective laws and
regulations and therefore free for general use.
ISBN: 978-81-19416-44-8
www.orangeava.com
Dedicated To
My beloved Parents:
Shri Pandian Marimuthu Subbiah
Smt Muthulekshmi Pandian
About the Author
Shanthababu Pandian holds a Bachelor’s degree in engineering in
Electronics and Communication, followed by three Master's degrees -
MTech, MBA, and M.S. - from a prestigious university in India.
Additionally, he completed a Post Graduate Program in Artificial
Intelligence and Machine Learning from the University of Texas, along with a
Post Graduate Certification in Data Science from the Indian Institute of
Technology, Guwahati. With over 21 years of extensive experience in
information technology (IT), Shanthababu specializes in data engineering and
analytics solutions, development and implementation using agile
methodologies, and building complex data models for Business Intelligence
(BI) and data science products for various customers located across the UK
and US regions. As part of his responsibilities, Shanthababu is accustomed to
liaising with key stakeholders and business teams, gathering and eliciting
requirements, and architecting cost-effective data modeling solutions as per
delivery frameworks. He is efficient at mitigating project delivery risks
while managing stakeholders and leading project team members across
different locations.
Technical Author at:
Analytics Vidhya:
https://www.analyticsvidhya.com/blog/author/shanthababu/
Data Science Central
https://www.datasciencecentral.com/author/shanthababup/
Technical author engagement with the following Data Industries:
Octopus Data Inc. Shenzhen, Guangdong, China
dezyre.com (https://www.projectpro.io/)
neptune.ai
StrictlyByTheNumbers.com
Shanthababu’s AI Views: https://shanthababu.com/blog-2/
Technical Book Reviewer for Packt Publications – BIRMINGHAM,
UK. Reviewed more than 30 books from international authors on
various technical aspects
National and International Technical Speaker in the AIML domain, with
more than 40 webinars presented
Technical Mentor for various Engineering and Technical institutions
across Tamil Nadu, India
About the Technical Reviewers
S.Ponmalar is an Academician with over 25 years of field and domain
experience in Information and Communication Engineering including optical
communication, Networks, Machine Learning, and Computer vision. She has
obtained her Doctoral degree in Information and Communcation Engineering
from Anna University. She is a recognized supervisor and guides many PG
and PhD scholars. She has published over 30 research papers in many
reputed Journals and Conferences. Her interest in upgrading with recent
trends and technology has obligated her to read and review articles and
books from different publishers.
https://github.com/ava-orange-
education/Ultimate-Enterprise-Data-
Analysis-and-Forecasting-using-Python
The code bundles and images of the book are also hosted on
https://rebrand.ly/5e9b56
PIRACY
If you come across any illegal copies of our works in any form on the
internet, we would be grateful if you would provide us with the location
address or website name. Please contact us at [email protected] with
a link to the material.
REVIEWS
Please leave a review. Once you have read and used this book, why not
leave a review on the site that you purchased it from? Potential readers
can then see and use your unbiased opinion to make purchase decisions.
We at Orange Education would love to know what you think about our
products, and our authors can learn from your feedback. Thank you!
For more information about Orange Education, please visit
www.orangeava.com.
Table of Contents
1. Introduction to Python and its key packages for DS and ML Projects
Introduction
Structure
Introduction to Python programming language
Key features of Python
Python programming IDEs and comparisons
Jupyter Notebook
PyCharm
Spyder
Installing Jupyter notebook
Python libraries
Pandas
Panel + Data = Pandas
Reshaping DataFrame
Combining DataFrame
Working with categorical data
Encoding
Date and time data
Converting data types
NumPy
Python statistics libraries
Working with various files in Python
Conclusion
Points to remember
Index
CHAPTER 1
Introduction to Python and its key
packages for DS and ML Projects
Introduction
Hello, my friends! I hope you are all aware that the focus of this book is on various
Time Series Analysis and Forecasting techniques and their implementation using
the Python Language. Python language is highly-demanded and powerful in recent
scenarios, not only for building web applications but also for implementing AIML
analytics and advanced analytics products. Before we dive into the objective of
this book, let me take you through some of the basics of Python programming
language skill sets that are required to build the TS&F model and analyze the same.
Please note that throughout this book, we will refer to “Time Series Analysis and
Forecasting” as TS&F for a quick reference to the content.
The major objective of this chapter is to discuss the basics of Python and its
libraries, specifically targeting those who are new to programming.
Structure
In this chapter, we will discuss the following topics:
Introduction to Python programming language
Key features of Python
Python programming IDEs and comparisons
Installing Jupyter notebook
Python libraries
Pandas
Date and time data
NumPy
Python statistics libraries
Working with various files in Python
Introduction to Python programming language
There are multiple answers that you can find on Google, but my straightforward
answer is “Python is a very simple, English, general-purpose programming
language”.
It has been designed with the base idea of emphasizing code readability in mind by
using significant indentation for programmers at any level to read. Similar to Java
programming language, Python is a dynamically typed, garbage-collected language
that supports multiple programming patterns, including structured, object-oriented,
functional programming and many more. That’s fine for all purposes, specifically,
this is an interpreter language which means that the code can be executed as soon as
it is written.
You may have a lot of questions, such as “What can Python do and Why use
Python?” Let’s quickly explore these points.
Python was created by Guido van Rossum and released in 1991. It has been used
like other programming languages for web development, software development,
mathematical modeling and frequently for system scripting.
CAPUT IV.
CAPUT V.
CAPUT VII.
CAPUT VIII.
CAPUT XI.
(2) Hæc igitur ibi Thebani scripta fuisse dicunt. Ostendunt etiam
Herculis ex Megara liberorum sepulcrum; de eorum morte iis omni
ex parte assentiuntur quæ sunt ab Himeræo Stesichoro et Panyasi in
versus relata. Addunt vero Thebani Herculem præ insania ipsum
etiam Amphitryonem occisurum fuisse, nisi lapide ictus somno se
dedisset; eum lapidem Minervam jecisse; Sophronistera (resipiscendi
auctorem) nominant. (3) Sunt eodem in loco feminarum jam fere
evanidæ imagines extra aream exstantes. Pharmacidas (Veneficas)
vocant Thebani; missas vero a Junone aiunt quo parturienti
Alcmenæ impedimento essent. Sed eas, dum Alcmenæ partum
inhiberent, Tiresiæ filiam Historidem tali astu elusisse. Ex eo namque
loco unde ipsæ facile audire possent, alta voce jubilavit quasi
peperisset Alcmena; illas ea voce deceptas abisse, Alcmenam vero
puerum enixam. (4) Herculis illic templum cum signis, quorum
alterum e candido lapide Promachum (propugnatorem) vocant,
Xenocriti et Eubii Thebanorum opus; alterum, ligneum simulacrum,
prisci operis Dædali fuisse arbitrantur; quod ut credam ipse quoque
facile adducor. Dedicasse ipse Dædalus fertur ut bene de se merito
gratias referret. Quum enim e Creta fugiens sibi et Icaro filio non
magna ædificasset navigia primusque omnium velificationem
adinvenisset, quo Minois classem, quæ remis tantum utebatur,
secundo impulsi vento anteverterent, tunc ipse quidem incolumis
evasit; (5) Icari vero navem imperitia gubernantis eversam tradunt;
sub undis enectum maris æstu delatum esse in insulam supra
Samum sitam atque nomine adhuc carentem; Herculem, quum forte
in illa loca venisset, agnitum cadaver sepelisse, ubi hac etiam ætate
non magnus terræ agger exstat in promontorio quod Ægæo mari
imminet; et ab Icaro hoc insulam et quod eam incingit mare nomen
accepisse. (6) Thebanis in templi fastigiis plurima ex duodecim
Herculis laboribus fecit Praxiteles. Quæ prætermisit sunt Stympheli
aves et Eleæ terræ purgatio; pro illis est cum Antæo lucta.
Thrasybulus quidem Lyci filius totaque illa Atheniensium exulum
manus, quod Thebis moventes expulsis triginta tyrannis patriam
recepissent, in Herculis fano Minervam et Herculem colossos, formis
a fundo elevatis, e Pentelico lapide, Alcamenis opus, posuerunt. Jam
vero gymnasium et stadium, utrumque de Herculis nomine
appellatum, cum templo conjuncta sunt. (7) Supra lapidem
Sophronistera est Apollinis ara cognomento Spodii e victimarum
cineribus congesta. Ominum ibi divinatio observatur, qua præ ceteris
maxime Græcis uti Smyrnæos novi. Est enim apud illos quoque extra
mœnia supra urbem ad omina captanda sacrata ædes.
CAPUT XII.
CAPUT XIII.
CAPUT XIV.
CAPUT XV.
CAPUT XVI.
CAPUT XVII.
(6) Phoci monumentum Bacis dixit hac de causa: Lyci uxor præ
ceteris diis Baccho honorem habebat; quum vero passa esset quæ
vulgo prodita sunt, Bacchus Antiopæ vehementer succensuit; invidia
vero deorum esse solet, unde immanes excitentur pœnæ; narrant
itaque Antiopen insaniisse et mente captam totam pererrasse
Græciam; Phocum vero Ornytione Sisyphi filio genitum, quum in
eam incidisset (?), insaniæ morbo liberasse et uxorem duxisse;
quocirca commune Antiopiæ et Phoco monumentum positum fuit.
(7) At eos lapides qui Amphionis tumulo subjacent nulla cura aut
arte elaborati, ea tradunt esse saxa quæ Amphionis cantum secuta
fuerant. Etiam de Orpheo proditum est feras fidibus canentem
secutas.
CAPUT XVIII.
(3) Exin proxima sunt Œdipi filiorum sepulcra. Ad ea quæ fiunt sacra
etsi ipse non spectavi, narrantibus tamen fidem habui. Aiunt enim
Thebani et aliis ex iis qui heroes vocantur, et Œdipi filiis inferias a se
mitti. His vero dum addent, quum flammam, tum emissum ex ea
fumum in partes duas discedere. (4) Id ego ut crederem me adduxit
quod in Mysia, quæ supra Caicum est, vidi. Est ibi modica urbs
Pioniæ appellata, cujus conditorem Pionin de posteris Herculis unum
incolæ perhibent. Huic dum parentant, sponte fumus e sepulcro
exsilit. Hoc ipse dum accideret vidi. Tiresiæ etiam monumentum,
quod abest a sepulcro filiorum Œdipi stadia ferme quindecim,
ostendunt Thebani. Verum quum et ipsi fateantur Tiresiam in
Haliartia e vita excessisse, cenotaphium esse qui apud se est
tumulum credunt. (8) Est etiam ad eam quæ Œdipodia appellatur
aquam Hectoris Priami filii apud Thebanos monumentum. Ejus enim
ossa ex hujusmodi oraculo ab Ilio se deportasse tradunt:
Excelsa incolitis Cadmi qui mœnia Thebas,
si patriam optatis nunquam non esse beatam,
ex Asia transferte domum magni Hectoris ossa;
hic Jovis imperio heroem sua justa manebunt.
CAPUT XIX.
(3) Sed interjecto dein tempore pristinum nomen recepit. Est etiam
Tanagræ Orionis monumentum et Cerycius mons, in quo editum in
lucem Mercurium tradunt; Polus præterea qui dicitur vicus. In eo
Atlantem consedisse ferunt, et quæ sub terra sunt et res cœlestes
diligenter investigantem. Quod ab Homero etiam dictum norunt:
Filia magnanimi Atlantis, qui cærula ponti,
qui cœlum ac terras prospectat, quique columnis
proceris gemini dirimit confinia mundi.
CAPUT XXI.