i was fiddling with my tumblr settings and discovered you can see how many things you've liked!
i have no idea if i even need the highest options but idk some people have been on tumblr for a long time
i'm not going to ask people to reblog but if you do, add your likes and how long you've been on tumblr in the tags!! ✨data✨
14 notes
·
View notes
MT
RHTAULTY
import pandas as pd
import numpy
covid = pd.read_csv('c:/Users/rhtau/acovid.csv', low_memory=False)
Our data needs to be made categorical therefore we will use the cut function
covid['mortality'] = pd.cut(covid['Covid.19 Deaths'],bins =[0,1000,5000,10000000],labels = ["Low","Average","High"])
covid['Covid.19 Cases'] = pd.cut(covid['Covid.19 Cases'],bins =[0,10000,200000,500000],labels = ["Low","Average","High"])
covid['incomeperperson'] = pd.cut(covid['incomeperperson'], bins =[0,1000,10000,1000000],labels = ["Low","Average","High"])
print('Number of observations(rows)')
print(len(covid))
print('Number of Variables')
print(len(covid.columns))
print('Counts for covid deaths based Low(0-1000), Medium(1001-5000) or High > 5001')
c1 = covid['mortality'].value_counts(sort=False)
print(c1)
print('Percentages for covid deaths')
p1 = covid['mortality'].value_counts(sort=False, normalize=True)
print(p1)
print('Counts for Covid.19 Cases based on Low (0-10000), Medium(10001-200000 or High > 200001')
c2 = covid['Covid.19 Cases'].value_counts(sort=False)
print(c2)
print('Percentages for Covid.19 Cases based on Low, Medium or High')
p2 = covid['Covid.19 Cases'].value_counts(sort=False, normalize=True)
print(p2)
print('Counts for Income per person based on Low, Medium or High')
c3=covid['incomeperperson'].value_counts(sort=False)
print(c3)
print('Counts for Income per person based on Low(0-1000), Medium(1001-10000 or High>10000')
c3=covid['incomeperperson'].value_counts(sort=False, normalize=True)
print(c3)
Number of observations(rows)
17
Number of Variables
10
Counts for covid deaths based Low(0-1000), Medium(1001-5000) or High > 5001
mortality
Low 4
Average 10
High 3
Percentages for covid deaths
mortality
Low 0.235294
Average 0.588235
High 0.176471
Counts for Covid.19 Cases based on Low (0-10000), Medium(10001-200000 or High > 200001
Covid.19 Cases
Low 1
Average 10
High 5
Percentages for Covid.19 Cases based on Low, Medium or High
Covid.19 Cases
Low 0.0625
Average 0.6250
High 0.3125
Counts for Income per person based on Low, Medium or High
incomeperperson
Low 10
Average 7
High 0
Counts for Income per person based on Low(0-1000), Medium(1001-10000 or High>10000
incomeperperson
Low 0.588235
Average 0.411765
High 0.000000
0 notes