Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def cig_age_over_days(period):
- cigagenone, cigagefew, cigagemid, cigagemany = [0,0,0,0]
- for item in drug_data:
- if item['CIGAFU'].startswith(age):
- total += 1
- if item['CIGMDAYS'].startswith('Non'):
- none += 1
- if item['CIGMDAYS'].startswith("1") or item['CIGMDAYS'].startswith("3-"):
- few += 1
- if item['CIGMDAYS'].startswith("6"):
- mid += 1
- if item['CIGMDAYS'].startswith("20") or item['CIGMDAYS'].startswith("30"):
- many += 1
- return none, few, mid, many, total
Advertisement
Add Comment
Please, Sign In to add comment