Preface |
|
xiii | |
|
I Learning Python in a Notebook Environment |
|
|
1 | (82) |
|
1 Introduction to Notebooks |
|
|
3 | (10) |
|
Running Python Statements |
|
|
4 | (1) |
|
|
4 | (1) |
|
|
5 | (7) |
|
|
6 | (3) |
|
|
9 | (1) |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
11 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
12 | (1) |
|
|
13 | (12) |
|
|
14 | (7) |
|
High-Level Versus Low-Level Languages |
|
|
15 | (1) |
|
|
15 | (6) |
|
Performing Basic Math Operations |
|
|
21 | (1) |
|
Using Classes and Objects with Dot Notation |
|
|
22 | (1) |
|
|
22 | (1) |
|
|
23 | (2) |
|
|
25 | (12) |
|
|
25 | (4) |
|
|
26 | (1) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
29 | (3) |
|
Creating Lists and Tuples |
|
|
29 | (1) |
|
Adding and Removing List Items |
|
|
30 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (2) |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
35 | (2) |
|
|
37 | (18) |
|
|
37 | (9) |
|
|
38 | (1) |
|
Accessing, Adding, and Updating by Using Keys |
|
|
38 | (1) |
|
Removing Items from Dictionaries |
|
|
39 | (1) |
|
|
40 | (3) |
|
Checking to See If a Dictionary Has a Key |
|
|
43 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (7) |
|
|
48 | (5) |
|
|
53 | (1) |
|
|
53 | (1) |
|
|
53 | (2) |
|
|
55 | (12) |
|
|
55 | (4) |
|
Compound Statement Structure |
|
|
56 | (1) |
|
Evaluating to True or False |
|
|
56 | (3) |
|
|
59 | (3) |
|
|
62 | (1) |
|
|
63 | (1) |
|
Break and continue Statements |
|
|
64 | (1) |
|
|
65 | (1) |
|
|
65 | (2) |
|
|
67 | (16) |
|
|
67 | (8) |
|
|
68 | (1) |
|
|
68 | (1) |
|
|
69 | (6) |
|
|
75 | (1) |
|
|
75 | (1) |
|
|
76 | (4) |
|
|
80 | (1) |
|
|
81 | (1) |
|
|
81 | (2) |
|
II Data Science Libraries |
|
|
83 | (88) |
|
|
85 | (18) |
|
Installing and Importing NumPy |
|
|
86 | (1) |
|
|
86 | (3) |
|
|
89 | (2) |
|
Element-by-Element Operations |
|
|
91 | (1) |
|
|
92 | (2) |
|
|
94 | (1) |
|
|
95 | (3) |
|
|
98 | (2) |
|
|
100 | (2) |
|
|
102 | (1) |
|
|
102 | (1) |
|
|
103 | (10) |
|
|
103 | (1) |
|
|
104 | (1) |
|
The scipy.special Submodule |
|
|
105 | (1) |
|
The scipy.stats Submodule |
|
|
105 | (6) |
|
|
105 | (3) |
|
|
108 | (3) |
|
|
111 | (1) |
|
|
111 | (2) |
|
|
113 | (22) |
|
|
113 | (1) |
|
|
114 | (3) |
|
Creating a DataFrame from a Dictionary |
|
|
114 | (1) |
|
Creating a DataFrame from a List of Lists |
|
|
115 | (1) |
|
Creating a DataFrame from a File |
|
|
116 | (1) |
|
Interacting with DataFrame Data |
|
|
117 | (10) |
|
|
117 | (1) |
|
|
118 | (2) |
|
|
120 | (1) |
|
|
121 | (2) |
|
Optimized Access by Label |
|
|
123 | (1) |
|
Optimized Access by Index |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
126 | (1) |
|
|
127 | (2) |
|
|
129 | (4) |
|
|
131 | (2) |
|
|
133 | (1) |
|
|
133 | (1) |
|
|
133 | (2) |
|
10 Visualization Libraries |
|
|
135 | (18) |
|
|
135 | (9) |
|
|
137 | (3) |
|
|
140 | (1) |
|
Plotting Multiple Sets of Data |
|
|
141 | (2) |
|
|
143 | (1) |
|
|
144 | (4) |
|
|
145 | (3) |
|
|
148 | (1) |
|
|
149 | (2) |
|
Other Visualization Libraries |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
151 | (2) |
|
11 Machine Learning Libraries |
|
|
153 | (6) |
|
Popular Machine Learning Libraries |
|
|
153 | (1) |
|
How Machine Learning Works |
|
|
154 | (3) |
|
|
154 | (1) |
|
Splitting Test and Training Data |
|
|
155 | (1) |
|
|
156 | (1) |
|
Learning More About Scikit-learn |
|
|
157 | (1) |
|
|
157 | (1) |
|
|
157 | (2) |
|
12 Natural Language Toolkit |
|
|
159 | (12) |
|
|
159 | (2) |
|
|
161 | (4) |
|
|
165 | (1) |
|
|
166 | (3) |
|
|
169 | (1) |
|
|
169 | (2) |
|
|
171 | (44) |
|
13 Functional Programming |
|
|
173 | (14) |
|
Introduction to Functional Programming |
|
|
173 | (6) |
|
|
174 | (1) |
|
Depending on Global State |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
Functional Programming Functions |
|
|
177 | (2) |
|
|
179 | (3) |
|
List Comprehension Basic Syntax |
|
|
179 | (1) |
|
|
180 | (1) |
|
|
181 | (1) |
|
Dictionary Comprehensions |
|
|
181 | (1) |
|
|
182 | (2) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
185 | (2) |
|
14 Object-Oriented Programming |
|
|
187 | (14) |
|
Grouping State and Function |
|
|
187 | (4) |
|
|
188 | (2) |
|
Private Methods and Variables |
|
|
190 | (1) |
|
|
190 | (1) |
|
|
191 | (5) |
|
|
192 | (1) |
|
|
192 | (3) |
|
|
195 | (1) |
|
|
196 | (3) |
|
|
199 | (1) |
|
|
199 | (2) |
|
|
201 | (14) |
|
|
201 | (3) |
|
|
201 | (3) |
|
Reading and Writing Files |
|
|
204 | (2) |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
207 | (5) |
|
|
208 | (1) |
|
|
209 | (1) |
|
|
209 | (1) |
|
|
210 | (1) |
|
|
210 | (1) |
|
|
211 | (1) |
|
|
211 | (1) |
|
Substitution Using Named Groups |
|
|
211 | (1) |
|
Compiling Regular Expressions |
|
|
211 | (1) |
|
|
212 | (1) |
|
|
212 | (3) |
A Answers to End-of-Chapter Questions |
|
215 | (6) |
Index |
|
221 | |