## NumPy Datetime: How to Work with Dates and Times in Python?

In this article, we’ll be learning about something that is literally everywhere. Whatever corner you turn, whatever street you run down, you can’t get away from it. It is as ubiquitous as the physical space around us. Yes today, we’re talking about… TIME. More specifically, we’re talking about NumPy’s functions that represent dates and times. … Read more

## NumPy Matrix Multiplication — np.matmul() and @ [Ultimate Guide]

Have you ever tried to multiply two NumPy arrays together and got a result you didn’t expect? NumPy’s multiplication functions can be confusing. In this article, we’ll explain everything you need to know about matrix multiplication in NumPy. Watch the video where I go over the article in detail: To perform matrix multiplication between 2 … Read more

## Matplotlib Line Plot – A Helpful Illustrated Guide

The line plot is the most iconic of all the plots. To draw one in matplotlib, use the plt.plot() function and pass it a list of numbers used as the y-axis values. Per default, the x-axis values are the list indexes of the passed line. Matplotlib automatically connects the points with a blue line per … Read more

## Matplotlib Scatter Plot – Simple Illustrated Guide

Scatter plots are a key tool in any Data Analyst’s arsenal. If you want to see the relationship between two variables, you are usually going to make a scatter plot.  In this article, you’ll learn the basic and intermediate concepts to create stunning matplotlib scatter plots. Minimal Scatter Plot Example The following code shows a … Read more

## Python How to Pad Zeros to a String?

Have you ever had a string and wanted to make it a certain length by adding zeros to it? You could type it out. But weβre programmers, we hate typing! Surely there must be a way to code this?Β  To pad zeros to a string, use the str.zfill() method. It takes one argument: the final … Read more

## Matplotlib Histogram — A Simple Illustrated Guide

The histogram is one of the most important plots for you to know. You’ll use it every time you explore a dataset. It is the go-to plot for plotting one variable.  In this article, you’ll learn the basics and some intermediate ideas. You’ll plot histograms like a pro in no time using Python and matplotlib. … Read more

## Python Dictionary – The Ultimate Guide

Python comes with several built-in data types. These are the foundational building blocks of the whole language. They have been optimised and perfected over many years. In this comprehensive tutorial, we will explore one of the most important: the dictionary (or dict for short). For your convenience, I’ve created a comprehensive 8000-word eBook which you … Read more

## Python’s Random Module – Everything You Need to Know to Get Started

Life is unpredictable. Sometimes good things happen out of the blue like you find \$100 on the floor. And sometimes bad things happen, like your flight being canceled because of bad weather. Most programming languages have a module to deal with randomness. Python is no exception coming with the module named random and in this … Read more

## How to Use np.linspace() in Python? A Helpful Illustrated Guide

In this article, I’ll explain the np.linspace function, how to use it and when you should. It has got a bit of a reputation for being complicated but, as you’ll see, it really isn’t! So, let’s get a quick overview first. Syntax: numpy.linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None, axis=0) Argument Default Description start – The … Read more

## Python Math Module [Ultimate Guide]

Python’s math module provides you with some of the most popular mathematical functions you may want to use. In this article, I’ll take you through the most common ones. You can also watch the following tutorial video in which I’ll guide you through the article: The math module is part of the Python standard library, … Read more

## Matplotlib Animation – A Helpful Illustrated Guide

Creating animations in matplotlib is reasonably straightforward. However, it can be tricky when starting, and there is no consensus for the best way to create them. In this article, I show you a few methods you can use to make amazing animations in matplotlib. Matplotlib Animation Example The hardest thing about creating animations in matplotlib … Read more

## Matplotlib 3D Plot [Tutorial]

Are you tired with the same old 2D plots? Do you want to take your plots to the next level? Well look no further, it’s time to learn how to make 3D plots in matplotlib. In addition to import matplotlib.pyplot as plt and calling plt.show(), to create a 3D plot in matplotlib, you need to: … Read more