Member-only story

Is Covid-19 Still A Threat? A Python Data Analysis

How many Covid-19 cases are there today?

Is Covid-19 Still A Threat? Image by Ajay kumar Singh from Pixabay.
Is Covid-19 Still A Threat? Image by Ajay Kumar Singh from Pixabay.

Each individual COVID-19 case is dramatic and each death is a tragedy, but is it still a threat to the major parts of our society? Welcome to Python Data Science December #17.

We will explore the COVID-19 cases & deaths over time for different countries in Europe using Python Pandas, Plotly & Matplotlib. All resources, datasets, required Python libraries & installations are listed at the end of the story, in the chapter Summary & Resources.

📅 The Data

I came across a COVID-19 dataset for the countries in the European Union from Eurostat. We will use it as the baseline for our article today.

I am using Python Jupyter notebook to examine the data, but you can also just take a regular Python script. To get a first impression of the data, let’s install & import Pandas and read the file into a Pandas DataFrame.

import pandas as pd
df = pd.read_csv('data.csv')

First, let us explore the dataset running df.info().

df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 9486 entries, 0 to 9485
Data columns (total 11 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 country 9486 non-null object
1 country_code 9180 non-null object
2 continent 9486 non-null object
3 population 9486 non-null int64
4 indicator 9486 non-null object
5 weekly_count 9078 non-null float64
6 year_week 9486 non-null object
7 rate_14_day 8997 non-null float64
8 cumulative_count 9078 non-null float64
9 source 9486 non-null object
10 note 0 non-null float64
dtypes: float64(4), int64(1), object(6)
memory usage: 815.3+ KB

We have 9486 rows of data structured into 11 columns. Let’s have a closer look at the first rows of the dataset and some random sample rows.

df.head()     #returns the first 5 rows
df.sample(n=10)     #returns a random sample of 10 rows

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Techletters
Techletters

Written by Techletters

#ai #datascience #salesforce #crypto #kafka #python — Follow me: https://techletters.medium.com/membership

No responses yet

Write a response