{"cells":[{"cell_type":"markdown","metadata":{"cell_id":"bdd49559a61446e9ae4c7112afb849ad","deepnote_cell_type":"markdown","id":"6R_wrLLWbw4X"},"source":["Alumno: Franco Giordano"]},{"cell_type":"code","execution_count":1,"metadata":{"cell_id":"906a05ba06514a90a9f8a59cff7b04ba","deepnote_cell_type":"code","id":"hzptjf3TRyoG","executionInfo":{"status":"ok","timestamp":1683166111288,"user_tz":180,"elapsed":407,"user":{"displayName":"Gonzalo Rodriguez","userId":"04777157778700303711"}}},"outputs":[],"source":["import pandas as pd"]},{"cell_type":"markdown","metadata":{"cell_id":"7e59f151f0f54d52a209611eb2b0955c","deepnote_cell_type":"markdown","id":"uy-K6xouZo-O"},"source":["# Dataset 1: Diabetes, hipertensión y ACV\n","\n","Consiste en un dataset de aproximadamente 71 mil encuestados. \n","\n","[Fuente del dataset](https://www.kaggle.com/datasets/prosperchuks/health-dataset?select=health_data.csv)"]},{"cell_type":"code","execution_count":2,"metadata":{"cell_id":"943307dbb8ec402d93191444a84718b4","colab":{"base_uri":"https://localhost:8080/","height":487},"deepnote_cell_type":"code","executionInfo":{"elapsed":5636,"status":"ok","timestamp":1683166122850,"user":{"displayName":"Gonzalo Rodriguez","userId":"04777157778700303711"},"user_tz":180},"id":"FgblGyVGYE77","outputId":"8f6aca2b-31f0-4ba8-83f3-931488150dc1"},"outputs":[{"output_type":"display_data","data":{"text/plain":[" Age Sex HighChol CholCheck BMI Smoker HeartDiseaseorAttack \\\n","0 4 1 0 1 26 0 0 \n","1 12 1 1 1 26 1 0 \n","2 13 1 0 1 26 0 0 \n","3 11 1 1 1 28 1 0 \n","4 8 0 0 1 29 1 0 \n","... ... ... ... ... ... ... ... \n","70687 6 0 1 1 37 0 0 \n","70688 10 1 1 1 29 1 1 \n","70689 13 0 1 1 25 0 1 \n","70690 11 0 1 1 18 0 0 \n","70691 9 0 1 1 25 0 1 \n","\n"," PhysActivity Fruits Veggies HvyAlcoholConsump GenHlth MentHlth \\\n","0 1 0 1 0 3 5 \n","1 0 1 0 0 3 0 \n","2 1 1 1 0 1 0 \n","3 1 1 1 0 3 0 \n","4 1 1 1 0 2 0 \n","... ... ... ... ... ... ... \n","70687 0 0 1 0 4 0 \n","70688 0 1 1 0 2 0 \n","70689 0 1 0 0 5 15 \n","70690 0 0 0 0 4 0 \n","70691 1 1 0 0 2 0 \n","\n"," PhysHlth DiffWalk Stroke HighBP Diabetes \n","0 30 0 0 1 0 \n","1 0 0 1 1 0 \n","2 10 0 0 0 0 \n","3 3 0 0 1 0 \n","4 0 0 0 0 0 \n","... ... ... ... ... ... \n","70687 0 0 0 0 1 \n","70688 0 1 0 0 1 \n","70689 0 1 0 1 1 \n","70690 0 1 0 1 1 \n","70691 0 0 0 1 1 \n","\n","[70692 rows x 18 columns]"],"text/html":["\n","
\n"," | Age | \n","Sex | \n","HighChol | \n","CholCheck | \n","BMI | \n","Smoker | \n","HeartDiseaseorAttack | \n","PhysActivity | \n","Fruits | \n","Veggies | \n","HvyAlcoholConsump | \n","GenHlth | \n","MentHlth | \n","PhysHlth | \n","DiffWalk | \n","Stroke | \n","HighBP | \n","Diabetes | \n","
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n","4 | \n","1 | \n","0 | \n","1 | \n","26 | \n","0 | \n","0 | \n","1 | \n","0 | \n","1 | \n","0 | \n","3 | \n","5 | \n","30 | \n","0 | \n","0 | \n","1 | \n","0 | \n","
1 | \n","12 | \n","1 | \n","1 | \n","1 | \n","26 | \n","1 | \n","0 | \n","0 | \n","1 | \n","0 | \n","0 | \n","3 | \n","0 | \n","0 | \n","0 | \n","1 | \n","1 | \n","0 | \n","
2 | \n","13 | \n","1 | \n","0 | \n","1 | \n","26 | \n","0 | \n","0 | \n","1 | \n","1 | \n","1 | \n","0 | \n","1 | \n","0 | \n","10 | \n","0 | \n","0 | \n","0 | \n","0 | \n","
3 | \n","11 | \n","1 | \n","1 | \n","1 | \n","28 | \n","1 | \n","0 | \n","1 | \n","1 | \n","1 | \n","0 | \n","3 | \n","0 | \n","3 | \n","0 | \n","0 | \n","1 | \n","0 | \n","
4 | \n","8 | \n","0 | \n","0 | \n","1 | \n","29 | \n","1 | \n","0 | \n","1 | \n","1 | \n","1 | \n","0 | \n","2 | \n","0 | \n","0 | \n","0 | \n","0 | \n","0 | \n","0 | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
70687 | \n","6 | \n","0 | \n","1 | \n","1 | \n","37 | \n","0 | \n","0 | \n","0 | \n","0 | \n","1 | \n","0 | \n","4 | \n","0 | \n","0 | \n","0 | \n","0 | \n","0 | \n","1 | \n","
70688 | \n","10 | \n","1 | \n","1 | \n","1 | \n","29 | \n","1 | \n","1 | \n","0 | \n","1 | \n","1 | \n","0 | \n","2 | \n","0 | \n","0 | \n","1 | \n","0 | \n","0 | \n","1 | \n","
70689 | \n","13 | \n","0 | \n","1 | \n","1 | \n","25 | \n","0 | \n","1 | \n","0 | \n","1 | \n","0 | \n","0 | \n","5 | \n","15 | \n","0 | \n","1 | \n","0 | \n","1 | \n","1 | \n","
70690 | \n","11 | \n","0 | \n","1 | \n","1 | \n","18 | \n","0 | \n","0 | \n","0 | \n","0 | \n","0 | \n","0 | \n","4 | \n","0 | \n","0 | \n","1 | \n","0 | \n","1 | \n","1 | \n","
70691 | \n","9 | \n","0 | \n","1 | \n","1 | \n","25 | \n","0 | \n","1 | \n","1 | \n","1 | \n","0 | \n","0 | \n","2 | \n","0 | \n","0 | \n","0 | \n","0 | \n","1 | \n","1 | \n","
70692 rows × 18 columns
\n","\n"," | index | \n","Patient Id | \n","Age | \n","Gender | \n","Air Pollution | \n","Alcohol use | \n","Dust Allergy | \n","OccuPational Hazards | \n","Genetic Risk | \n","chronic Lung Disease | \n","... | \n","Fatigue | \n","Weight Loss | \n","Shortness of Breath | \n","Wheezing | \n","Swallowing Difficulty | \n","Clubbing of Finger Nails | \n","Frequent Cold | \n","Dry Cough | \n","Snoring | \n","Level | \n","
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n","0 | \n","P1 | \n","33 | \n","1 | \n","2 | \n","4 | \n","5 | \n","4 | \n","3 | \n","2 | \n","... | \n","3 | \n","4 | \n","2 | \n","2 | \n","3 | \n","1 | \n","2 | \n","3 | \n","4 | \n","Low | \n","
1 | \n","1 | \n","P10 | \n","17 | \n","1 | \n","3 | \n","1 | \n","5 | \n","3 | \n","4 | \n","2 | \n","... | \n","1 | \n","3 | \n","7 | \n","8 | \n","6 | \n","2 | \n","1 | \n","7 | \n","2 | \n","Medium | \n","
2 | \n","2 | \n","P100 | \n","35 | \n","1 | \n","4 | \n","5 | \n","6 | \n","5 | \n","5 | \n","4 | \n","... | \n","8 | \n","7 | \n","9 | \n","2 | \n","1 | \n","4 | \n","6 | \n","7 | \n","2 | \n","High | \n","
3 | \n","3 | \n","P1000 | \n","37 | \n","1 | \n","7 | \n","7 | \n","7 | \n","7 | \n","6 | \n","7 | \n","... | \n","4 | \n","2 | \n","3 | \n","1 | \n","4 | \n","5 | \n","6 | \n","7 | \n","5 | \n","High | \n","
4 | \n","4 | \n","P101 | \n","46 | \n","1 | \n","6 | \n","8 | \n","7 | \n","7 | \n","7 | \n","6 | \n","... | \n","3 | \n","2 | \n","4 | \n","1 | \n","4 | \n","2 | \n","4 | \n","2 | \n","3 | \n","High | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
995 | \n","995 | \n","P995 | \n","44 | \n","1 | \n","6 | \n","7 | \n","7 | \n","7 | \n","7 | \n","6 | \n","... | \n","5 | \n","3 | \n","2 | \n","7 | \n","8 | \n","2 | \n","4 | \n","5 | \n","3 | \n","High | \n","
996 | \n","996 | \n","P996 | \n","37 | \n","2 | \n","6 | \n","8 | \n","7 | \n","7 | \n","7 | \n","6 | \n","... | \n","9 | \n","6 | \n","5 | \n","7 | \n","2 | \n","4 | \n","3 | \n","1 | \n","4 | \n","High | \n","
997 | \n","997 | \n","P997 | \n","25 | \n","2 | \n","4 | \n","5 | \n","6 | \n","5 | \n","5 | \n","4 | \n","... | \n","8 | \n","7 | \n","9 | \n","2 | \n","1 | \n","4 | \n","6 | \n","7 | \n","2 | \n","High | \n","
998 | \n","998 | \n","P998 | \n","18 | \n","2 | \n","6 | \n","8 | \n","7 | \n","7 | \n","7 | \n","6 | \n","... | \n","3 | \n","2 | \n","4 | \n","1 | \n","4 | \n","2 | \n","4 | \n","2 | \n","3 | \n","High | \n","
999 | \n","999 | \n","P999 | \n","47 | \n","1 | \n","6 | \n","5 | \n","6 | \n","5 | \n","5 | \n","4 | \n","... | \n","8 | \n","7 | \n","9 | \n","2 | \n","1 | \n","4 | \n","6 | \n","7 | \n","2 | \n","High | \n","
1000 rows × 26 columns
\n","\n"," | policy_id | \n","policy_tenure | \n","age_of_car | \n","age_of_policyholder | \n","area_cluster | \n","population_density | \n","make | \n","segment | \n","model | \n","fuel_type | \n","... | \n","is_brake_assist | \n","is_power_door_locks | \n","is_central_locking | \n","is_power_steering | \n","is_driver_seat_height_adjustable | \n","is_day_night_rear_view_mirror | \n","is_ecw | \n","is_speed_alert | \n","ncap_rating | \n","is_claim | \n","
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n","ID00001 | \n","0.515874 | \n","0.05 | \n","0.644231 | \n","C1 | \n","4990 | \n","1 | \n","A | \n","M1 | \n","CNG | \n","... | \n","No | \n","No | \n","No | \n","Yes | \n","No | \n","No | \n","No | \n","Yes | \n","0 | \n","0 | \n","
1 | \n","ID00002 | \n","0.672619 | \n","0.02 | \n","0.375000 | \n","C2 | \n","27003 | \n","1 | \n","A | \n","M1 | \n","CNG | \n","... | \n","No | \n","No | \n","No | \n","Yes | \n","No | \n","No | \n","No | \n","Yes | \n","0 | \n","0 | \n","
2 | \n","ID00003 | \n","0.841110 | \n","0.02 | \n","0.384615 | \n","C3 | \n","4076 | \n","1 | \n","A | \n","M1 | \n","CNG | \n","... | \n","No | \n","No | \n","No | \n","Yes | \n","No | \n","No | \n","No | \n","Yes | \n","0 | \n","0 | \n","
3 | \n","ID00004 | \n","0.900277 | \n","0.11 | \n","0.432692 | \n","C4 | \n","21622 | \n","1 | \n","C1 | \n","M2 | \n","Petrol | \n","... | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","2 | \n","0 | \n","
4 | \n","ID00005 | \n","0.596403 | \n","0.11 | \n","0.634615 | \n","C5 | \n","34738 | \n","2 | \n","A | \n","M3 | \n","Petrol | \n","... | \n","No | \n","Yes | \n","Yes | \n","Yes | \n","No | \n","Yes | \n","Yes | \n","Yes | \n","2 | \n","0 | \n","
... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","... | \n","
58587 | \n","ID58588 | \n","0.355089 | \n","0.13 | \n","0.644231 | \n","C8 | \n","8794 | \n","2 | \n","A | \n","M3 | \n","Petrol | \n","... | \n","No | \n","Yes | \n","Yes | \n","Yes | \n","No | \n","Yes | \n","Yes | \n","Yes | \n","2 | \n","0 | \n","
58588 | \n","ID58589 | \n","1.199642 | \n","0.02 | \n","0.519231 | \n","C14 | \n","7788 | \n","1 | \n","A | \n","M1 | \n","CNG | \n","... | \n","No | \n","No | \n","No | \n","Yes | \n","No | \n","No | \n","No | \n","Yes | \n","0 | \n","0 | \n","
58589 | \n","ID58590 | \n","1.162273 | \n","0.05 | \n","0.451923 | \n","C5 | \n","34738 | \n","1 | \n","A | \n","M1 | \n","CNG | \n","... | \n","No | \n","No | \n","No | \n","Yes | \n","No | \n","No | \n","No | \n","Yes | \n","0 | \n","0 | \n","
58590 | \n","ID58591 | \n","1.236307 | \n","0.14 | \n","0.557692 | \n","C8 | \n","8794 | \n","1 | \n","B2 | \n","M6 | \n","Petrol | \n","... | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","2 | \n","0 | \n","
58591 | \n","ID58592 | \n","0.124429 | \n","0.02 | \n","0.442308 | \n","C8 | \n","8794 | \n","3 | \n","C2 | \n","M4 | \n","Diesel | \n","... | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","Yes | \n","No | \n","Yes | \n","Yes | \n","3 | \n","0 | \n","
58592 rows × 44 columns
\n","