Reader small image

You're reading from  Practical Time Series Analysis

Product typeBook
Published inSep 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781788290227
Edition1st Edition
Languages
Right arrow
Authors (2):
Avishek Pal
Avishek Pal
author image
Avishek Pal

Dr. Avishek Pal, PhD, is a software engineer, data scientist, author, and an avid Kaggler living in Hyderabad, India. He achieved his Bachelor of Technology degree in industrial engineering from the Indian Institute of Technology (IIT) Kharagpur and earned his doctorate in 2015 from University of Warwick, Coventry, United Kingdom. He started his career as a software engineer at IBM India developing middleware solutions for telecom clients. This was followed by stints at a start-up product development company followed by Ericsson, the global telecom giant. After doctoral studies, Avishek started his career in India as a lead machine learning engineer for a leading US-based investment company. He is currently working at Microsoft as a senior data scientist. Avishek has published several research papers in reputed international conferences and journals.
Read more about Avishek Pal

PKS Prakash
PKS Prakash
author image
PKS Prakash

Dr. PKS Prakash is a data scientist and author. He has spent the last 12 years in developing many data science solutions in several practical areas in healthcare, manufacturing, pharmaceuticals, and e-commerce. He currently works as the data science manager at ZS Associates. He is the co-founder of Warwick Analytics, a spin-off from University of Warwick, UK. Prakash has published articles widely in research areas of operational research and management, soft computing tools, and advanced algorithms in leading journals such as IEEE-Trans, EJOR, and IJPR, among others. He has edited an article on Intelligent Approaches to Complex Systems and contributed to books such as Evolutionary Computing in Advanced Manufacturing published by WILEY and Algorithms and Data Structures using R and R Deep Learning Cookbook, published by PACKT.
Read more about PKS Prakash

View More author details
Right arrow

Basic data types


Python supports basic numeric data types such as int, long, and float, just like all major programming languages. None represents a null pointer in Python.

Strings are sequential data types in Python. Other sequential data types that are commonly used in Python are lists and tuples. The difference between a list and tuple is that the former is mutable while the latter is an immutable type. Therefore, the interpreter would throw an error if you try to modify a tuple. Let's dig a little deeper into lists and tuples.

List, tuple, and set

A list is a collection of elements. An element can be of any data type and a list can contain elements of different data types. A list has several important functions such as append, extend, insert, index, pop, and few others. The following table summarizes the functionality of these functions:

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Practical Time Series Analysis
Published in: Sep 2017Publisher: PacktISBN-13: 9781788290227

Authors (2)

author image
Avishek Pal

Dr. Avishek Pal, PhD, is a software engineer, data scientist, author, and an avid Kaggler living in Hyderabad, India. He achieved his Bachelor of Technology degree in industrial engineering from the Indian Institute of Technology (IIT) Kharagpur and earned his doctorate in 2015 from University of Warwick, Coventry, United Kingdom. He started his career as a software engineer at IBM India developing middleware solutions for telecom clients. This was followed by stints at a start-up product development company followed by Ericsson, the global telecom giant. After doctoral studies, Avishek started his career in India as a lead machine learning engineer for a leading US-based investment company. He is currently working at Microsoft as a senior data scientist. Avishek has published several research papers in reputed international conferences and journals.
Read more about Avishek Pal

author image
PKS Prakash

Dr. PKS Prakash is a data scientist and author. He has spent the last 12 years in developing many data science solutions in several practical areas in healthcare, manufacturing, pharmaceuticals, and e-commerce. He currently works as the data science manager at ZS Associates. He is the co-founder of Warwick Analytics, a spin-off from University of Warwick, UK. Prakash has published articles widely in research areas of operational research and management, soft computing tools, and advanced algorithms in leading journals such as IEEE-Trans, EJOR, and IJPR, among others. He has edited an article on Intelligent Approaches to Complex Systems and contributed to books such as Evolutionary Computing in Advanced Manufacturing published by WILEY and Algorithms and Data Structures using R and R Deep Learning Cookbook, published by PACKT.
Read more about PKS Prakash

Function name

Functionality

append

Adds a new element to the end of the list.

extend

Adds new elements from an iterable. The members of the iterable element...