Pandas Sample, Explained

In this tutorial, I’ll show you how to use the Pandas sample technique to retrieve a random sample from a Python dataframe. I’ll explain what Pandas sample does, I’ll explain the syntax, and I’ll show you step-by-step examples of how to use this technique. You can click on any of the following links, and it … Read more

How to Use np.random.uniform

An image that shows a uniform probability distribution, and explains that Numpy random uniform creates Numpy arrays drawn from the uniform distribution in Python.

In this tutorial I’ll show you how to use the np.random.uniform function (AKA, Numpy random uniform). I’ll explain what the function does, explain the syntax, and show you clear examples of how the function works. If you need something specific, you can click on any of the following links and it will take you to … Read more

Numpy Argmax, Explained

Numpy argmax gets the index of the maximum value of a Numpy array.

This tutorial explains how to use the Numpy argmax function. It explains the syntax of np.argmax, and also shows step-by-step examples. You can click on any of the links below, and it will take you to the appropriate section of the tutorial. Table of Contents: Introduction to Numpy Argmax Syntax Examples Having said that, if … Read more

How to Use the Pandas Assign Method to Add New Variables

In this tutorial, I’ll explain how to use the Pandas assign method to add new variables to a Pandas dataframe. In this tutorial, I’ll explain what the assign method does and how it works. I’ll explain the syntax, and I’ll show you step-by-step examples of how to use it. If you need something specific, you … Read more

How to Use Numpy Round

An image that shows a simple example of how Numpy round works.

In this tutorial I’ll explain how to use the Numpy round function (AKA, np.round). I’ll explain how the function works, and I’ll also show you some step-by-step examples of how to use it. Table of Contents: A Quick Introduction to Numpy Round The syntax of np.round Numpy Round examples You can click on any of … Read more

np.random.randn Explained

An image that shows how numpy.random.randn generates numbers from the standard normal distribution, with a mean of 0 and a standard deviation of 1.

In this tutorial, I’ll explain how to use the np.random.randn function (AKA, Numpy random randn). The tutorial is divided up into several different sections, including a quick overview of what the function does, an explanation of the syntax, and a section that shows step-by-step examples. You can click on any of the following links and … Read more