{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":4289678,"sourceType":"datasetVersion","datasetId":2527538}],"dockerImageVersionId":30786,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n for filename in filenames:\n print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2024-11-03T13:38:24.170309Z","iopub.execute_input":"2024-11-03T13:38:24.170800Z","iopub.status.idle":"2024-11-03T13:38:24.182787Z","shell.execute_reply.started":"2024-11-03T13:38:24.170755Z","shell.execute_reply":"2024-11-03T13:38:24.181615Z"},"jupyter":{"source_hidden":true}},"outputs":[{"name":"stdout","text":"/kaggle/input/diabetes-dataset/diabetes.csv\n/kaggle/input/agn/pytorch/default/1/quananalysis-with-agns-diabetes-patient-outcome.ipynb\n/kaggle/input/agn/pytorch/default/1/qa-with-agns-cardiovascular-risk.py\n/kaggle/input/agn/pytorch/default/1/qa-with-agns-arrhythmia-detection-and-analysis.ipynb\n","output_type":"stream"}],"execution_count":23},{"cell_type":"code","source":"# Step 1: Load the necessary libraries\nimport pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n# Load the dataset (replace 'diabetes.csv' with the correct path)\ndf = pd.read_csv('/kaggle/input/diabetes-dataset/diabetes.csv')\n\n# Display the first few rows of the dataset\ndf.head()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-11-03T13:38:24.185427Z","iopub.execute_input":"2024-11-03T13:38:24.186024Z","iopub.status.idle":"2024-11-03T13:38:24.206506Z","shell.execute_reply.started":"2024-11-03T13:38:24.185970Z","shell.execute_reply":"2024-11-03T13:38:24.205409Z"},"jupyter":{"source_hidden":true}},"outputs":[{"execution_count":24,"output_type":"execute_result","data":{"text/plain":" Pregnancies Glucose BloodPressure SkinThickness Insulin BMI \\\n0 6 148 72 35 0 33.6 \n1 1 85 66 29 0 26.6 \n2 8 183 64 0 0 23.3 \n3 1 89 66 23 94 28.1 \n4 0 137 40 35 168 43.1 \n\n DiabetesPedigreeFunction Age Outcome \n0 0.627 50 1 \n1 0.351 31 0 \n2 0.672 32 1 \n3 0.167 21 0 \n4 2.288 33 1 ","text/html":"
\n | Pregnancies | \nGlucose | \nBloodPressure | \nSkinThickness | \nInsulin | \nBMI | \nDiabetesPedigreeFunction | \nAge | \nOutcome | \n
---|---|---|---|---|---|---|---|---|---|
0 | \n6 | \n148 | \n72 | \n35 | \n0 | \n33.6 | \n0.627 | \n50 | \n1 | \n
1 | \n1 | \n85 | \n66 | \n29 | \n0 | \n26.6 | \n0.351 | \n31 | \n0 | \n
2 | \n8 | \n183 | \n64 | \n0 | \n0 | \n23.3 | \n0.672 | \n32 | \n1 | \n
3 | \n1 | \n89 | \n66 | \n23 | \n94 | \n28.1 | \n0.167 | \n21 | \n0 | \n
4 | \n0 | \n137 | \n40 | \n35 | \n168 | \n43.1 | \n2.288 | \n33 | \n1 | \n