Coffee Break NumPy
Coffee Break NumPy
A Simple Road to Data Science Mastery That Fits Into Your Busy Life
About the Book
Do you want to learn data science 44% faster?
The new textbook Coffee Break NumPy leverages the scientifically proven way of puzzle-based learning to code!
"Students who were quizzed after studying a short text could recall significantly more information than students who were asked to reread it" (Karpicke, 2007b)
Fear of missing out on data science and machine learning? The trend of automation is not coming to a halt soon. Machines take over more and more traditional jobs from human workers.
But also highly-skilled knowledge workers such as doctors, traditional computer scientists, teachers, and financial analysts are under the danger to be replaced by machines.
This is the era of machine learning and data science.
And missing out on data science can be the #1 most costly mistake of your career.
But you're in luck: this eBook package gives you a fun way to start learning data science with Python. It gives you a thorough introduction in one of Python's most important libraries for data science and machine learning: NumPy.
I have written the book on the basis of the proven method of solving practical code puzzles and practice testing -- to make learning more fun, faster, and smarter.
And here's the best thing: practice testing is scientifically proven to generate up to 44% better learning retention and efficiency.
So what's in it for you?
- Understand NumPy code quickly.
- Learn all the basic NumPy concepts and data structures.
- Finally understand the most important NumPy functions and how to use them for practical problems.
As an additional bonus, you can track your individual NumPy coding skill level throughout the book. After reading the book, you'll know exactly how good you are in comparison to your friends and colleagues.
To get the most out of this book, you should know the basics of Python — e.g., you have already read my previous book "Coffee Break Python".
The book is packed with 211 pages of in-depth NumPy content:
- 46 educative code puzzles to test your skills and to make learning easy and fun!
- 10 tips for efficient learning to help you stop wasting time!
- 1 NumPy cheat sheets to learn 80% of the language features in 20% of the space!
- 1 accurate way to measure your coding skills because clarity is the first step to success!
- [BONUS] 1 detailed NumPy tutorial for absolute beginners to get you started!
Have your "Coffee Break NumPy" now! ;)
Packages
The Book
Includes:
Code Samples
Get all code from the book as Jupyter Notebook!
PDF
EPUB
English
eBook Package with 7 Video Tutorials
Learn the content faster with video! This package contains 7 Bonus Videos (NumPy Tutorial) from the author about the content of the book.
Includes:
Code Samples
Get all code from the book as Jupyter Notebook!
Instructional Video
A Full NumPy Course (8 Video Tutorials) from the Author.
PDF
EPUB
English
Bundles that include this book
Reader Testimonials
Chris C.
Real-world NumPy
"Another great little Python book from Christian and his colleagues. As a practitioner in this field, I really appreciate the focus on real-world problems. I can see my coffee breaks will be full for some time to come!"
Pepe
Fun and Engaging
The puzzle-solving methodology is very engaging and not very time demanding. Although far from being a computer scientist, I was able to strengthen my data science skills. I found this as engaging and exciting as the first one "Coffee Break Python" and I recommend it to every upcoming data scientist.
Table of Contents
Contents
1 Introduction 1
2 Why Learn NumPy? 5
3 A Case for Puzzle-based Learning 8
3.1 Overcome the Knowledge Gap . . . . . . . 10
3.2 Embrace the Eureka Moment . . . . . . . 11
3.3 Divide and Conquer . . . . . . . . . . . . 12
3.4 Improve From Immediate Feedback . . . . 14
3.5 Measure Your Skills . . . . . . . . . . . . . 15
3.6 Individualized Learning . . . . . . . . . . . 18
3.7 Small is Beautiful . . . . . . . . . . . . . . 19
3.8 Active Beats Passive Learning . . . . . . . 21
3.9 Make Code a First-class Citizen . . . . . . 23
3.10 What You See is All There is . . . . . . . 25
4 The Elo Rating for Python—and NumPy 27
4.1 How to Use This Book . . . . . . . . . . . 28
4.2 The Ideal Code Puzzle . . . . . . . . . . . 30
4.3 How to Exploit the Power of Habits? . . . 31
4.4 How to Test and Train Your Skills? . . . . 32
4.5 What Can This Book Do For You? . . . . 36
5 A Quick Data Science Tutorial: The NumPy Library 40
5.1 What is NumPy? . . . . . . . . . . . . . . 41
5.2 What can NumPy do for me? . . . . . . . 42
5.3 What are the Limitations of NumPy? . . . 44
5.4 What are the Linear Algebra Basics You
Need to Know? . . . . . . . . . . . . . . . 45
5.5 What are Arrays and Matrices in NumPy? 54
5.6 What are Axes and the Shape of an Array? 57
5.7 How to Create and Initialize NumPy Arrays? 60
5.8 How does indexing and slicing work in Python? 67
5.9 How Does Indexing and Slicing Work in
NumPy? . . . . . . . . . . . . . . . . . . . 72
5.10 NumPy Cheat Sheet . . . . . . . . . . . . 79
6 NumPy Basics 81
6.1 NumPy 1D Array Creation . . . . . . . . . 82
6.2 NumPy 2D Array Creation . . . . . . . . . 84
6.3 Extracting Array Dimensionality . . . . . 86
6.4 Accessing Array Shape . . . . . . . . . . . 89
6.5 Averaging 1D Arrays . . . . . . . . . . . . 92
6.6 Working with Not a Number the Wrong
Way . . . . . . . . . . . . . . . . . . . . . 95
6.7 Working with Not a Number the Right Way 97
6.8 Creating Numerical Sequences . . . . . . . 99
6.9 Creating Numerical Intervals . . . . . . . . 101
6.10 Initializing Multi-Dimensional Arrays . . . 103
6.11 Revisiting Linear Algebra . . . . . . . . . 106
6.12 Understanding the Hadamard Product . . 108
6.13 Broadcasting . . . . . . . . . . . . . . . . 111
6.14 Practicing Simple Indexing . . . . . . . . . 114
6.15 The Boolean Indexing Trick . . . . . . . . 117
6.16 Slicing Matrices Like Paper . . . . . . . . 119
6.17 Simple Array Logic . . . . . . . . . . . . . 123
6.18 Mastering Slice Assignments . . . . . . . . 126
6.19 Sorting an Array (Part 1) . . . . . . . . . 128
6.20 Sorting an Array (Part 2) . . . . . . . . . 130
6.21 Computing Array Element Differences . . 133
6.22 Computing Array of Cumulative Sums . . 135
7 Linear Algebra and Statistics 137
7.1 Calculating 1D Dot Product . . . . . . . . 137
7.2 Multiplying 2D Matrices . . . . . . . . . . 141
7.3 Enhancing Vector Operations . . . . . . . 144
7.4 Linear Algebra Made Simple . . . . . . . . 147
7.5 Revisiting Average . . . . . . . . . . . . . 151
7.6 Reshaping 1D Arrays . . . . . . . . . . . . 153
7.7 Averaging 2D Arrays . . . . . . . . . . . . 156
7.8 Weighted Averaging Along Axes . . . . . . 158
7.9 Calculating 1D Variance . . . . . . . . . . 161
7.10 Axis Variance of a 2D Array . . . . . . . . 163
7.11 1D Axis Standard Deviation . . . . . . . . 166
8 Practical Data Science 169
8.1 Statistical Operations . . . . . . . . . . . . 169
8.2 Data Cleaning or Living in an Unperfect
World . . . . . . . . . . . . . . . . . . . . 172
8.3 Understandig the Basics of Filters . . . . . 174
8.4 Creating Filters . . . . . . . . . . . . . . . 176
8.5 Mastering the Power of Filters . . . . . . . 178
8.6 Applying Filters . . . . . . . . . . . . . . . 180
8.7 Finding Array Elements . . . . . . . . . . 182
8.8 Leveraging Data Science to Boost Revenues
I . . . . . . . . . . . . . . . . . . . . . . . 184
8.9 Leveraging Data Science to Boost Revenues
II . . . . . . . . . . . . . . . . . . . . . . . 188
8.10 Finding and Locating Maximum Elements 192
8.11 Computing Number of Hospital Patients . 196
8.12 Finding Chunks of Allocated Memory . . . 199
8.13 Giving Meaning to the Mean . . . . . . . . 203
9 Final Remarks 207
Your skill level . . . . . . . . . . . . . . . 208
Where to go from here? . . . . . . . . . . 209
Other books by these authors
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them