Search icon CANCEL
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Practical Time Series Analysis

You're reading from  Practical Time Series Analysis

Product type Book
Published in Sep 2017
Publisher Packt
ISBN-13 9781788290227
Pages 244 pages
Edition 1st Edition
Languages
Authors (2):
Avishek Pal Avishek Pal
Profile icon Avishek Pal
PKS Prakash PKS Prakash
Profile icon PKS Prakash
View More author details

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