text_plain_output_1.png
from sklearn import linear_model

import pandas as pd

import statsmodels.api as sm

df1 = pd.read_csv('../input/indiastate/data state.csv')

target = pd.DataFrame(df1.Deceased, columns=['Deceased'])

x = df1['Active']
y = target['Deceased']

model = sm.OLS(y, x).fit()
predictions = model.predict(x)
model.summary()

target = pd.DataFrame(df1.Deceased, columns=['Deceased'])
X = df1[['Confirmed', 'Active', 'Recovered', 'Deceased']]
y = target['Deceased']

from sklearn import linear_model
lm = linear_model.LinearRegression()
model = lm.fit(X, y)

predictions = lm.predict(X)

print(predictions)