Analyzing covid-19 with Python, part 3 [data exploration]

An image of Python code analyzing covid19 data, with an image of the sars-cov-2 virus in the background.

This tutorial is part of a series of tutorials analyzing covid-19 data. For parts 1 and 2, see the following posts: https://www.sharpsightlabs.com/blog/python-data-analysis-covid19-part1/ https://www.sharpsightlabs.com/blog/python-data-analysis-covid19-part2/ Covid19 analysis, part 3: initial data exploration If you’ve been following along with this tutorial series, you’ll know that in the most recent tutorial, we defined a process for getting and cleaning … Read more

Python Data Analysis: covid-19, part 2 [merge datasets]

An image that shows Python syntax, merging datasets for a data analysis, with an image of the sars-cov-2 virus in the background.

This tutorial is part of a series of tutorials analyzing covid-19 data. For part 1, see the following post: https://www.sharpsightlabs.com/blog/python-data-analysis-covid19-part1/ Covid19 analysis, part 2: merge datasets In the previous tutorial in this series, we began analyzing covid19 data using Python. Specifically, in part 1, we created a process for getting the covid19 data for confirmed … Read more

Python Data Analysis: covid-19 data, part 1 [data wrangling]

An image that shows Python data analysis code, with a sars-cov-19 virus in the background.

If you’re like most people around the world, you’re probably concerned with the coronavirus, AKA, sars-cov-19, which for the sake of simplicity, I’ll refer to as covid-19. As you’re reading this, there’s a reasonable chance that you’re stuck working from home or otherwise quarantined in some way. Welcome to 2020 … it’s crazy. Assuming that … Read more

How to use Numpy flatten

An image that shows how Numpy flatten works.

This tutorial will show you how to use the Numpy flatten method. It will explain the syntax of the method and show you how to flatten an array in Numpy. The following is a table of contents. If you’re looking for something specific, you can click on any of the links to jump to the … Read more

np.random.randint Explained

This tutorial will explain how to use the np.random.randint function from Numpy (AKA, Numpy random randint). Ultimately, you’ll learn how to use Numpy to generate random integers drawn from a uniform distribution. The tutorial will explain the syntax of np.random.randint. It will also show you clear, step-by-step examples of how to use np.random.randint. The tutorial … Read more

Numpy log explained

An image that shows how Numpy log calculates the natural logarithm in Python.

In this tutorial, you’ll learn how to use the Numpy log function to calculate logarithms in Python. This tutorial will explain the syntax of np.log, and it will also show you step-by-step examples of Numpy log that you can run yourself. If you have something specific that you need, you can click on any of … Read more

Numpy standard deviation explained

An image that shows Numpy standard deviation computing the standard deviation of a Numpy array.

This tutorial will explain how to use the Numpy standard deviation function (AKA, np.std). At a high level, the Numpy standard deviation function is simple. It calculates the standard deviation of the values in a Numpy array. But the details of exactly how the function works are a little complex and require some explanation. That … Read more

How to Use Pandas Reset Index

An image that shows reset_index resetting the index of a DataFrame.

This tutorial will show you how to use the Pandas reset index method. It will explain the syntax of reset_index, and it will also show you clear step-by-step examples of how to use reset_index to reset the index of a Pandas DataFrame. The tutorial has several sections. You can click on one of the following … Read more

Numpy where explained

An image that shows the syntax of Numpy where, intended as the Featured Image.

In this tutorial, I’ll show you how to use the Numpy where function. I’ll explain what np.where is and also how the syntax of np.where works. Later in the tutorial, I’ll show you clear, step-by-step examples of how the function works, so you can see it in action. If you need to find something specific, … Read more

How to use the Pandas sort_values method

This tutorial will show you how to use the Pandas sort_values method to sort a DataFrame by column. The sort_values method is fairly straightforward to use, but this tutorial will explain everything step by step. I’ll explain what the sort values method does. I’ll explain the syntax. And then I’ll provide clear, step-by-step examples of … Read more