## The Ultimate Introduction to Sorting in NumPy

Imagine you need to find a book in your bookshelf. What situation would you prefer: A) your bookshelf contains all your books in no specific order, or B) your bookshelf contains all books alphabetically sorted by title. Of course, option B) would save you a lot of time – especially if you access your bookshelf …

## How to Use Slice Assignment in NumPy?

Real-world data is seldomly clean: It may contain errors because of faulty sensor, or it may contain missing data because of damaged sensors. In this one-liner section, you learn about how to quickly handle smaller cleaning tasks in a single line of code. The Basics Say, you have installed a temperature sensor in your garden …

## NumPy Cheat Sheet: The Top 5 Tips and Tricks

Cheat sheets are the 80/20 principles for coding: learn 80% of the features in 20% of the time. For my “Coffee Break Python” email subscribers, I create a weekly Python cheat sheet. Currently, NumPy is all over the space, so for the launch of my new book “Coffee Break NumPy“, I have created the following …

## How to use NumPy Boolean Indexing to Uncover Instagram Influencers

This article will give you a practical one-liner solution and teach you how to write concise NumPy code using boolean indexing and broadcasting in NumPy. The Basics NumPy plays an important role in the Python programming language. Not only does it add basic linear algebra functionality to Python, but, with its array data structure, it …

## What’s the Best NumPy Book?

Fear of missing out in data science? Data science and machine learning are taking over. Data-driven decision making penetrates every single company nowadays. Data science is indeed the “sexiest job in the 21st century“! There is one Python library which is the basis of any data science related computation you can undertake as a Python …

## The np.nonzero() Trick: How to Search a NumPy Array

This article explains you how to find array elements using the nonzero() function in NumPy — using a practical data science example. The megatrend urbanization does not come to a halt soon. Cars, factories, and other sources of pollution ultimately lead to poor air quality. This one-liner shows you how to deal with it from …

## 3 Little-Known NumPy Tricks in One Line [Python Puzzle]

This one-liner demonstrates the power of three interesting NumPy features and how their combination can solve a small data science problem in a clean and efficient manner. Every NumPy array has a certain data type. Keep this in mind, when exploring the following one-liner code. Although you need to know three different pieces of information …

## [NumPy Tutorial] How to Calculate Post-Tax Income in One Line?

This article will not only show you how to solve a day-to-day accounting task – which would usually take many lines of Python code – in a single line of code. But it will also introduce you to some elementary functionalities of Python’s wildly important library for numerical computations and data science: NumPy. The Basics …

## [Video] 7 Tips to Self-Publish Your First Coding Book

Do you dream of publishing your own book? You are not alone. 80% of adults dream of writing their own book. And in fact, publishing your first coding book can be a great way of boosting your coding career to the next level! For example, thanks to the sales of my “Coffee Break Python” books, …

## NumPy Broadcasting – A Simple Tutorial

It’s how you talk that shows who you are. There is one term that is only known by advanced NumPy coders. If you know the term, consider yourself a NumPy pro. If you don’t, you still have to learn. The term is “broadcasting”. The documentation tells us that broadcasting “describes how NumPy treats arrays with …

## Lambda Functions in Python: A Simple Introduction

“Is there any in-depth demonstration of lambda functions apart from the documentation? I’ve seen the lambda function a lot of times, more than anything in Python. I want to understand its proper arrangement and many other features.” — Prashant This question was asked in my “Coffee Break Python” email series. Watch the video or read …

## How Real Freelancers Earn Money in 2019: 10 Practical Python Projects

Are you frustrated coding dummy projects in order to learn Python? This article gives you 10 highly practical code projects which you can solve by yourself to improve your skills. If you want to learn about how much money you can expect to earn as a Python freelancer, grab your free video analysis: “​How to …