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

The 3 Reasons You Should Learn R for Data Science

An image of the R logo and Python logo, explaining that there are 3 reasons you should learn R for data science.

One of the most common questions I get from data science students is which programming language should I learn for data science, R or Python? The short answer is “it depends.” Both R and Python have strengths and weaknesses as data science languages, or as broader programming languages. So here in this blog post, I … 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

Numpy Floor, Explained

An image that shows using np.floor to compute the floor of the values in a Numpy array.

In this tutorial, I’ll explain how to use the Numpy floor function, which is sometime called np.floor. I’ll explain the syntax of np.floor and how the function works. I’ll also show you clear, step by step examples of how to use it. If you need something specific, you can click on any of the following … Read more

Numpy Square, Explained

An image that shows Numpy square computing the squares of the values in a Numpy array.

In this tutorial, I’ll show you how to use the Numpy square function, which is sometimes called np.square. The Numpy square function is fairly straight forward, but in the tutorial, we’ll explain everything step by step. You’ll learn about how the syntax works, and we’ll also show you some clear examples. Table of Contents: A … Read more