Search icon CANCEL
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

Keywords and functions


Keywords are reserved words that cannot be used as variable names. The following table gives the list of keywords and their purpose:

Keywords

Explanation

False

Boolean false value:

>>bool_var = False

True

Boolean true value:

>>bool_var = True

and

Logical operator that returns True only if both the operands are True or evaluates to True:

>>a = 2

>>if a > 0:

print(a)

>>2

as

Creates an alias for a module that is being imported:

import pandas as pd

import scikit-learn as skl

assert

Used to evaluate a logical expression to check values of variables at runtime and raises an AssertionError if the expression evaluates to False:

>>a = -2

>> assert a > 0

The preceding assert keyword raises an AssertionError.

break

Used to exit a loop such as forloop or while loop when a condition is met.

class

Keyword that indicates a class declaration.

continue

Indicates the interpreter to move to the next iteration in a for or while loop without executing the code in the...

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