Covid-19 Deaths Prediction With Machine Learning
Covid-19 Deaths Prediction With Machine Learning
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 1/12
7/7/23, 9:55 PM Covid-19 Deaths Prediction with Machine Learning | Aman Kharwal
1 import pandas as pd
2 import numpy as np
3 data = pd.read_csv("COVID19 data for overall INDIA
4 print(data.head())
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 2/12
7/7/23, 9:55 PM Covid-19 Deaths Prediction with Machine Learning | Aman Kharwal
1 data.isnull().sum()
Date 0
Date_YMD 0
Daily Confirmed 0
Daily Deceased 0
dtype: int64
We don’t need the date column, so let’s drop this column from
our dataset:
1 import plotly.express as px
2 fig = px.bar(data, x='Date_YMD', y='Daily Confirme
3 fig.show()
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 3/12
7/7/23, 9:55 PM Covid-19 Deaths Prediction with Machine Learning | Aman Kharwal
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 4/12
7/7/23, 9:55 PM Covid-19 Deaths Prediction with Machine Learning | Aman Kharwal
10 fig.show()
1.2840580507834722
1 import plotly.express as px
2 fig = px.bar(data, x='Date_YMD', y='Daily Deceased
3 fig.show()
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 5/12
7/7/23, 9:55 PM Covid-19 Deaths Prediction with Machine Learning | Aman Kharwal
pip install autots
Daily Deceased
2022-01-19 271.950000
2022-01-20 310.179787
2022-01-21 297.500000
2022-01-22 310.179787
2022-01-23 271.950000
2022-01-24 258.518302
2022-01-25 340.355520
2022-01-26 296.561343
2022-01-27 296.561343
2022-01-28 284.438262
2022-01-29 323.400000
2022-01-30 271.950000
2022-01-31 245.750000
2022-02-01 284.438262
2022-02-02 258.518302
2022-02-03 239.969607
2022-02-04 271.950000
2022-02-05 334.118953
2022-02-06 323.400000
2022-02-07 271.950000
2022-02-08 284.438262
2022-02-09 323.400000
2022-02-10 258.518302
2022-02-11 245.750000
2022-02-12 245.750000
2022-02-13 326.442185
2022-02-14 323.400000
2022-02-15 394.343619
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 7/12
7/7/23, 9:55 PM Covid-19 Deaths Prediction with Machine Learning | Aman Kharwal
2022-02-16 228.117431
2022-02-17 358.200000
Summary
So this is how we can predict covid-19 deaths with machine
learning using the Python programming language. We can use
the historical data of covid-19 cases and deaths to predict the
number of deaths in future. You can implement the same
method for predicting covid-19 deaths and waves on the latest
dataset. I hope you liked this article on covid-19 deaths
prediction with machine learning. Feel free to ask valuable
questions in the comments section below.
Aman Kharwal
ARTICLES: 1451
https://thecleverprogrammer.com/2022/03/29/covid-19-deaths-prediction-with-machine-learning/ 8/12