text_plain_output_1.png image_output_1.png
import numpy as np

import numpy as np

import pandas as pd

import pandas as pd

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

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

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

labels = list(df1.State)
decease = list(df1.Deceased)

df1['Active'] = df1['Confirmed'] - (df1['Deceased'] + df1['Recovered'])
df1['Deceased Rate (per 100)'] = np.round(100 * df1['Deceased'] / df1['Confirmed'], 2)
df1['Recovered Rate (per 100)'] = np.round(100 * df1['Recovered'] / df1['Confirmed'], 2)
df1.sort_values('Confirmed', ascending=False).fillna(0).style.background_gradient(cmap='Blues', subset=['Confirmed']).background_gradient(cmap='Blues', subset=['Deceased']).background_gradient(cmap='Blues', subset=['Recovered']).background_gradient(cmap='Blues', subset=['Active']).background_gradient(cmap='Blues', subset=['Deceased Rate (per 100)']).background_gradient(cmap='Blues', subset=['Recovered Rate (per 100)'])

df1.columns