From the course: Python Data Analysis

Unlock the full course today

Join today to access over 24,500 courses taught by industry experts.

Summarizing COVID-19 data

Summarizing COVID-19 data - Python Tutorial

From the course: Python Data Analysis

Summarizing COVID-19 data

- [Instructor] Let's start our analysis of the COVID-19 dataset. We will look at cumulative quantities such as total cases and total deaths at the end of the pandemic. Grouping by country, and asking for the last value gets us variables in 2024 indexed by country. Maybe the most obvious question we can ask of the data is which country had the most cases? PANDAS offers a convenient built-in method and largest to see the largest entries in a series. Here it is, the United States on the top. As printed, this series looks a bit vanilla and it's not so easy to parse. We get a cleaner look by converting it to a dataframe. Even better, we can apply some styling to the numbers using style format. I like this very readable look. I will make generic functions to apply to series and dataframes, and I will stick those functions into PANDAS, adding methods to the series and data frame classes. These methods are written as anonymous Lambda functions. This trick is known as monkey patching, which is…

Contents