Cover
Half-title
Title Page
Copyright
Contents
Preface
Chapter-1. Python Basics
1.1 Introduction
1.2 Computational Problem Solving
1.3 Computer Hardware, Software and Programming Languages
1.4 Installing Python
1.5 Tokens
1.6 Operators
1.7 Data Types
1.8 Expressions
1.9 Reading Input
1.10 Displaying Output
1.11 Comments
1.12 Summary
1.13 Try Yourself
Chapter-2. Control Statements
2.1 Introduction
2.2 Selection Control Statements
2.3 The ‘while’ Statement
2.4 Infinite Loops
2.5 The ‘for’ Statement
2.6 Definite vs Indefinite Loops
2.7 Jump Statements - ‘break’ and ‘continue’
2.8 The ‘pass’ Statement
2.9 ‘Loop Else’ Clause
2.10 Summary
2.11 Try Yourself
Chapter-3. Functions
3.1 Introduction
3.2 Built-in Functions
3.3 Modules in Python
3.4 Defining a Function
3.5 Calling a Function and Passing Parameters
3.6 Value-Returning Functions
3.7 Non-Value-Returning Functions
3.8 Scope and Lifetime of Variables
3.9 Default Arguments
3.10 Keyword Arguments
3.11 Variable-length Arguments
3.12 Functional Programming
3.13 Turtle Graphics
3.14 Summary
3.15 Try Yourself
Chapter-4. Lists
4.1 Introduction
4.2 Creating Lists
4.3 Reading the Items of a List through the Keyboard
4.4 Basic List Operations
4.5 List Functions and Methods
4.6 List Comprehension
4.7 Summary
4.8 Try Yourself
Chapter-5. Dictionaries
5.1 Introduction
5.2 Basic Dictionary Operations
5.3 Dictionary Functions and Methods
5.4 Default Dictionary
5.5 Summary
5.6 Try Yourself
Chapter-6. Tuples and Sets
6.1 Introduction
6.2 Creating Tuples
6.3 Basic Tuple Operations
6.4 Tuple Methods
6.5 Sets
6.6 Creating a Set
6.7 Basic Set Operations
6.8 Summary
6.9 Try Yourself
Chapter-7. File Processing
7.1 Introduction
7.2 Types of Files
7.3 File Paths
7.4 Creating and Using Text Files
7.5 Reading and Writing Binary Files
7.6 The Pickle Module
7.7 Reading and Writing CSV Files
7.8 Summary
7.9 Try Yourself
Chapter-8. String Processing and Exception Handling
8.1 Introduction
8.2 Traversing a String
8.3 String Operators
8.4 Slicing the Strings
8.5 String Methods
8.6 Exception Handling
8.7 Built-in Exceptions
8.8 User-defined Exception-handling Mechanism
8.9 The ‘else’ block
8.10 ‘Finally’ block
8.11 Summary
8.12 Try Yourself
Chapter-9. Object-Oriental Programming
9.1 Introduction
9.2 Classes and Objects
9.3 Defining Classes
9.4 Creating Objects
9.5 Encapsulation
9.6 Inheritance
9.7 Polymorphism
9.8 Multiple Inheritance
9.9 Private Data Members and Methods
9.10 Recursive Functions
9.11 Summary
9.12 Try Yourself
Chapter-10. NumPy and Pandas Libraries
10.1 NumPy Library
10.2 NumPy Array Creation
10.3 NumPy Array Initialization
10.4 NumPy Array Attributes
10.5 Indexing in NumPy Arrays
10.6 Basic Arithmetic Operations on NumPy Arrays
10.7 Mathematical Functions in NumPy Library
10.8 Changing the Shape of a NumPy Array
10.9 Stacking and Splitting NumPy Arrays
10.10 Broadcasting in NumPy Arrays
10.11 Pandas Library and Series Data Structure
10.12 Summary
10.13 Try Yourself
Chapter-11. Data Visualization
11.1 Introduction
11.2 The Pyplot Module
11.3 Functions in Pyplot Module
11.4 Line Plot
11.5 Colours, Markers and Line Styles
11.6 Labels, Ticks and Legends
11.7 Bar Chart
11.8 Pie Chart
11.9 Histogram
11.10 Scatter Plot
11.11 Seaborn Library
11.12 Summary
11.13 Try Yourself
Chapter-12. Exploring and Plotting Data
12.1 Introduction
12.2 Creation of a Data Frame
12.3 Accessing the Columns in a Data Frame
12.4 Row Index and Column Names
12.5 Data Frame Indexing and Selecting Data
12.6 Reading Data from a CSV File
12.7 Sorting the Data
12.8 Basic Attributes and Methods of DataFrame Class
12.9 Plotting in Pandas
12.10 DateTime Column
12.11 The ‘apply()’ Function
12.12 Summary
12.13 Try Yourself
Chapter-13. Data Aggregation
13.1 Introduction
13.2 Basic Aggregation Operation
13.3 Aggregating Functions
13.4 Calculations Based on Multiple Columns
13.5 Grouping Data Using Dates and Times
13.6 Summary
13.7 Try Yourself
Chapter-14. Combining Datasets
14.1 Introduction
14.2 Concatenate and Append Operations
14.3 Merge Operation
14.4 Inner Merge Operation
14.5 Left Merge Operation
14.6 Right Merge Operation
14.7 Outer Merge Operation
14.8 Summary
14.9 Try Yourself
Chapter-15 .Machine Learning
15.1 Introduction
15.2 Supervised Learning
15.3 Unsupervised Learning
15.4 Summary
15.5 Try Yourself
Chapter-16. Regression Models
16.1 Introduction
16.2 Implementation in Python
16.3 Hyperparameters
16.4 Summary
16.5 Try Yourself
Chapter-17. Classification Models
17.1 Introduction
17.2 Implementation in Python
17.3 Goodness of Fit and Accuracy of Logistic Regression Model
17.4 Summary
17.5 Try Yourself
Chapter-18. Clustering Models
18.1 Introduction
18.2 K-Means Clustering Method
18.3 Hierarchical Clustering Method
18.4 Summary
18.5 Try Yourself