How to Use the Numpy Linspace Function

A visual representation of the output of np.arange(start = 0, stop = 100, num = 5).

The NumPy linspace function (sometimes called np.linspace) is a tool in Python for creating numeric sequences. It’s somewhat similar to the NumPy arange function, in that it creates sequences of evenly spaced numbers structured as a NumPy array. There are some differences though. Moreover, some people find the linspace function to be a little tricky … Read more

How to Use the Numpy Arange Function

A NumPy array of floats from 1 to 4, made with np.arange.

The Numpy arange function (sometimes called np.arange) is a tool for creating numeric sequences in Python. If you’re learning data science in Python, the Numpy toolkit is important. The NumPy arange function is particularly important because it’s very common; you’ll see the np.arange function in a lot of data science code. Having said that, this … Read more

How to use Numpy reshape

NumPy arrays are an important component of the Python data science ecosystem. When working with NumPy arrays, you’re going to need to be able to perform basic data manipulation. In particular, you may need to change the “shape” of the data; you may need to change how the data are arranged in the NumPy array. … Read more

How to use mutate in R

If you want to master data science in R, you need to master foundational tools like the mutate() function. Readers here at the Sharp Sight blog will know how much we emphasize “foundational” data science skills. If you want to be effective as a junior data scientist, you need to master the fundamental skills. If … Read more

How to rename columns in R

In this blog post, I’ll show you how to rename columns in R. This is pretty straightforward if you know how to do it properly, but there are also some little challenges in renaming variables. So very briefly, I’ll explain why renaming variables in a dataframe can be a little confusing in R. Then, I’ll … Read more

How to create a substring in R

Substring of characters 1 to 6, which reads "fluent"

If you want to be a data scientist, you need to master core data manipulation tools. One particular skill you’ll need to master is string manipulation. You need to be able to work with strings (i.e. character data) in order to clean, modify, or reshape them. In this blog post, you’ll learn one specific string … Read more