2024-10-04 22:36:46 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Начало лабы\n",
"\n",
"Выгрузка данных из csv в датафрейм и вывел названия колонок"
]
},
{
"cell_type": "code",
2024-11-01 20:30:19 +04:00
"execution_count": 1,
2024-10-04 22:36:46 +04:00
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['Pregnancies', 'Glucose', 'BloodPressure', 'SkinThickness', 'Insulin',\n",
" 'BMI', 'DiabetesPedigreeFunction', 'Age', 'Outcome'],\n",
" dtype='object')\n"
]
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\".//static//csv//diabetes.csv\")\n",
"print(df.columns)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Вывод данных и первая диаграмма - гистограмма\n",
"частота людей с диабетом в определенном возрасте"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Pregnancies Glucose BloodPressure SkinThickness Insulin BMI \\\n",
"0 6 148 72 35 0 33.6 \n",
"1 1 85 66 29 0 26.6 \n",
"2 8 183 64 0 0 23.3 \n",
"3 1 89 66 23 94 28.1 \n",
"4 0 137 40 35 168 43.1 \n",
"\n",
" DiabetesPedigreeFunction Age Outcome \n",
"0 0.627 50 1 \n",
"1 0.351 31 0 \n",
"2 0.672 32 1 \n",
"3 0.167 21 0 \n",
"4 2.288 33 1 \n",
" Pregnancies Glucose BloodPressure SkinThickness Insulin BMI \\\n",
"763 10 101 76 48 180 32.9 \n",
"764 2 122 70 27 0 36.8 \n",
"765 5 121 72 23 112 26.2 \n",
"766 1 126 60 0 0 30.1 \n",
"767 1 93 70 31 0 30.4 \n",
"\n",
" DiabetesPedigreeFunction Age Outcome \n",
"763 0.171 63 0 \n",
"764 0.340 27 0 \n",
"765 0.245 30 0 \n",
"766 0.349 47 1 \n",
"767 0.315 23 0 \n"
]
},
{
"data": {
"text/plain": [
"Text(0, 0.5, 'Частота')"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjIAAAGwCAYAAACzXI8XAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAnkElEQVR4nO3df1SVdYLH8c9V5AIKKCi/FF3NUksxV10jW/PXhtY4mp6maZwZnTy6Gjr+WjPakmi3MGdnss6Wjv2w05Y5OWWOteoSCu6UmDJLRhmp2cCMgGYBgnH1yHf/mOM9oYBwvfDcL75f5zzncJ9ffL589fA5z/Nwr8sYYwQAAGChDk4HAAAA8BVFBgAAWIsiAwAArEWRAQAA1qLIAAAAa1FkAACAtSgyAADAWkFOB2htdXV1OnHihMLDw+VyuZyOAwAAmsEYozNnzighIUEdOjR+3aXdF5kTJ04oMTHR6RgAAMAHJSUl6tWrV6Pb232RCQ8Pl/S3H0RERITDaQAAQHNUVVUpMTHR+3u8Me2+yFy8nRQREUGRAQDAMld6LISHfQEAgLUoMgAAwFoUGQAAYC2KDAAAsBZFBgAAWIsiAwAArEWRAQAA1qLIAAAAa1FkAACAtSgyAADAWhQZAABgLYoMAACwFkUGAABYiyIDAACsRZEBAADWCnI6gM0yXBlOR/BJukl3OgIAAH7BFRkAAGAtigwAALAWRQYAAFiLIgMAAKxFkQEAANaiyAAAAGs5WmTWrVunpKQkRUREKCIiQsnJydqxY4d3e21trVJTUxUdHa0uXbpoxowZKi8vdzAxAAAIJI4WmV69emn16tXKz8/XwYMHNX78eE2dOlWffvqpJGnp0qXavn27tmzZotzcXJ04cULTp093MjIAAAggjr4h3pQpU+q9fuKJJ7Ru3Trl5eWpV69eeumll7Rp0yaNHz9ekrRx40YNGjRIeXl5uuWWW5yIDAAAAkjAPCNz4cIFbd68WTU1NUpOTlZ+fr7Onz+viRMnevcZOHCgevf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+fk6f/68Jk6c6N1n4MCB6t27t/bt29fgOTwej6qqquotAACgfXL0isz31dXVacmSJRo9erQGDx4sSSorK1NwcLC6du1ab9/Y2FiVlZU1eJ7MzExlZGS0dlyrZbjs+/mkm3SnIwAAAlDAXJFJTU1VYWGhNm/efFXnSUtLU2VlpXcpKSnxU0IAABBoAuKKzMKFC/Xuu+9q79696tWrl3d9XFyczp07p4qKinpXZcrLyxUXF9fgudxut9xud2tHBgAAAcDRKzLGGC1cuFBbt27V7t271bdv33rbhw8frk6dOik7O9u7rqioSMXFxUpOTm7ruAAAIMA4ekUmNTVVmzZt0rZt2xQeHu597iUyMlKhoaGKjIzUnDlztGzZMkVFRSkiIkKLFi1ScnIyf7EEAACcLTLr1q2TJI0dO7be+o0bN2r27NmSpKefflodOnTQjBkz5PF4lJKSoueff76NkwIAgEDkaJExxlxxn5CQED333HN67rnn2iARAACwScD81RIAAEBLUWQAAIC1KDIAAMBaFBkAAGAtigwAALAWRQYAAFiLIgMAAKxFkQEAANaiyAAAAGtRZAAAgLV8/oiCmpoa5ebmqri4WOfOnau37Ze//OVVBwMAALgSn4rM//3f/+nOO+/U2bNnVVNTo6ioKH399dcKCwtTTEwMRQYAALQJn24tLV26VFOmTNG3336r0NBQ5eXl6c9//rOGDx+u//iP//B3RgAAgAb5VGQKCgq0fPlydejQQR07dpTH41FiYqLWrFmjhx9+2N8ZAQAAGuRTkenUqZM6dPjboTExMSouLpYkRUZGqqSkxH/pAAAAmuD
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"\n",
"print(df.head())\n",
"print(df.tail())\n",
"\n",
"data = df[\"Age\"]\n",
"data = data[20:120]\n",
"\n",
"plt.hist(data, color=\"purple\")\n",
"plt.xlabel(\"Возраст\")\n",
"plt.ylabel(\"Частота\")\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Н а данной гистограмме отображена информация по наличию диабета у индейцев Пима в определенном возрасте. Можем сделать вывод что диабет преобладает у молодых людей в возрасте от 20 до 30 лет, а дальше частота падает, можно сделать вывод, что люди не доживают до старчества"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Вторая диаграмма - точечная диаграмма\n",
"Зависимость инсулина и глюкозы\n"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Text(0, 0.5, 'Инсулин')"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjsAAAGwCAYAAABPSaTdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABjyklEQVR4nO3deXgUVbo/8G939oSkkxCSTmSLLEIMuywZEB0NEmUUB+6MICg4DCgSr4B6gbkiKjq4o4jCiArOMOJyfzpsisMmiIRFIGIIImDY02EgpAMJ2brr90esNt3ppaq6eqt8P8/Do3RXV5/qarreOuc979EJgiCAiIiISKP0gW4AERERkS8x2CEiIiJNY7BDREREmsZgh4iIiDSNwQ4RERFpGoMdIiIi0jQGO0RERKRp4YFuQDCwWq04d+4c4uPjodPpAt0cIiIikkAQBFy+fBkZGRnQ61333zDYAXDu3Dm0a9cu0M0gIiIiBU6fPo22bdu6fJ7BDoD4+HgAjR9WQkJCgFtDREREUlRWVqJdu3a267grDHYA29BVQkICgx0iIqIQ4ykFhQnKREREpGkMdoiIiEjTGOwQERGRpjHYISIiIk1jsENERESaxmCHiIiINI3BDhEREWkagx0iIiLSNAY7REREpGmsoExERNSCWawC9pSU4/zlGqTGR2NAZjLC9NpaFJvBDhERUQu1oagUz6wtRqm5xvZYuiEa8+7MQl52egBbpi4OYxEREbVAG4pKMXXlfrtABwBM5hpMXbkfG4pKA9Qy9THYISIiamEsVgHPrC2G4OQ58bFn1hbDYnW2RehhsENERNTC7Ckpb9aj05QAoNRcgz0l5f5rlA8x2CEiImphzl92Hego2S7YMdghIiJqYVLjo1XdLtgx2CEiImphBmQmI90QDVcTzHVonJU1IDPZn83yGQY7RERELUyYXod5d2YBQLOAR/z7vDuzNFNvh8EOERFRC5SXnY4l4/vCaLAfqjIaorFkfF9N1dlhUUEiIqIWKi87HcOyjKygTERERNoVptchp1PrQDfDpziMRURERJrGYIeIiIg0jcEOERERaRqDHSIiItI0BjtERESkaQx2iIiISNMY7BAREZGmMdghIiIiTQtosGOxWDB37lxkZmYiJiYGnTp1wvz58yEIgm0bQRDw1FNPIT09HTExMcjNzcXRo0ft9lNeXo5x48YhISEBiYmJmDRpEq5cueLvwyEiIqIgFNBg58UXX8SSJUuwePFiHD58GC+++CJeeuklvPnmm7ZtXnrpJSxatAhLly7F7t27ERcXh+HDh6Ompsa2zbhx43Do0CFs3LgR69atw/bt2zFlypRAHBIREREFGZ3QtBvFz373u98hLS0N7733nu2x0aNHIyYmBitXroQgCMjIyMBjjz2Gxx9/HABgNpuRlpaGFStWYMyYMTh8+DCysrKwd+9e3HDDDQCADRs24I477sCZM2eQkZHR7H1ra2tRW1tr+3tlZSXatWsHs9mMhIQEHx81ERERqaGyshIGg8Hj9TugPTu/+c1vsHnzZvz0008AgO+//x47duzA7bffDgAoKSmByWRCbm6u7TUGgwEDBw5EQUEBAKCgoACJiYm2QAcAcnNzodfrsXv3bqfvu2DBAhgMBtufdu3a+eoQiYiIKMACuhDo7NmzUVlZiW7duiEsLAwWiwXPP/88xo0bBwAwmUwAgLS0NLvXpaWl2Z4zmUxITU21ez48PBzJycm2bRzNmTMHM2fOtP1d7NkhIiIi7QlosPPJJ5/gn//8Jz788ENcf/31KCwsxPTp05GRkYEJEyb47H2joqIQFRXls/0TERFR8AhosPPEE09g9uzZGDNmDACgR48eOHnyJBYsWIAJEybAaDQCAMrKypCenm57XVlZGXr37g0AMBqNOH/+vN1+GxoaUF5ebns9ERERtVwB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IicsFiFfDM2mIITp4TH3tmbTEsVmdbULBgsENEROTCnpLyZj06TQkASs012FNS7r9GkWwMdoiIiFw4f9l1oKNkOwoMBjtEREQupMZHq7odBQaDHSIiIhcGZCYj3RANVxPMdWiclTUgM9mfzSKZGOwQERG5EKbXYd6dWQDQLOAR/z7vzizW2wlyDHaIiIjcyMtOx5LxfWE02A9VGQ3RWDK+L+vshAAWFSQiIvIgLzsdw7KMrKAcohjsEBERSRCm1yGnU+tAN4MU4DAWERERaRqDHSIiItI0BjtERESkaQx2iIiISNMY7BAREZGmMdghIiIiTWOwQ0RERJrGYIeIiIg0jcEOERERaRqDHSIiItI0BjtERESkaQx2iIiISNMY7BAREZGmMdghIiIiTWOwQ0RERJrGYIeIiIg0jcEOERERaRqDHSIiItI0BjtERESkaQx2iIiISNPCA90AIiKSz2IVsKekHOcv1yA1PhoDMpMRptcFullEQSngPTtnz57F+PHj0bp1a8TExKBHjx747rvvbM8LgoCnnnoK6enpiImJQW5uLo4ePWq3j/LycowbNw4JCQlITEzEpEmTcOXKFX8fChGRX2woKsWQF7dg7LJdePSjQoxdtgtDXtyCDUWlgW4aUVAKaLBz6dIlDB48GBEREfjyyy9RXFyMV199FUlJSbZtXnrpJSxatAhLly7F7t27ERcXh+HDh6Ompsa2zbhx43Do0CFs3LgR69atw/bt2zFlypRAHBIRkU9tKCrF1JX7UWqusXvcZK7B1JX7GfAQOaETBEEI1JvPnj0b3377Lb755hunzwuCgIyMDDz22GN4/PHHAQBmsxlpaWlYsWIFxowZg8OHDyMrKwt79+7FDTfcAADYsGED7rjjDpw5cwYZGRke21FZWQmDwQCz2YyEhAT1DpCISEUWq4AhL25pFuiIdACMhmjsmHULh7SoRZB6/Q5oz86aNWtwww034A9/+ANSU1PRp08fLFu2zPZ8SUkJTCYTcnNzbY8ZDAYMHDgQBQU
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"data = df[[\"Insulin\", \"Glucose\"]].copy()\n",
"plt.scatter(data[\"Glucose\"], data[\"Insulin\"])\n",
"plt.xlabel(\"Глюкоза\")\n",
"plt.ylabel(\"Инсулин\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Существует положительная корреляция между уровнем инсулина и уровнем глюкозы. Это означает, что с увеличением уровня инсулина чаще наблюдаются более высокие уровни глюкозы. В диапозоне инсулина от 0 до 200 единиц наблюдается выскоая плотность точек с уровнями глюкозы от 50 до 125, это гвоорит о том, что большинство людей имеют инсулин и глюкозу в этих пределах."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Третья диаграма - Круговая диаграмма\n",
"Анализ смертности у индейцев Пима."
]
},
{
"cell_type": "code",
"execution_count": 44,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Text(0, 0.5, '')"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnwAAAJ8CAYAAABk7XxWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABIWUlEQVR4nO3dd3iV9cHG8ftkT0ICJBAS9pa9FBAUGWpxW/V11jpqffXF3dZRiwpobR2tVhxoRSuitU4UFasIKBsZIpBAIAMIIXuvc877B5aKQnKSnHN+z3nO93NdXGrQcMeBX57pcLvdbgEAAMC2QkwPAAAAgG8RfAAAADZH8AEAANgcwQcAAGBzBB8AAIDNEXwAAAA2R/ABAADYHMEHAABgcwQfAACAzRF8AAAANkfwAQAA2BzBBwAAYHMEHwAAgM0RfAAAADZH8AEAANgcwQcAAGBzBB8AAIDNEXwAAAA2R/ABAADYHMEHAABgcwQfAACAzRF8AAAANkfwAQAA2BzBBwAAYHMEHwAAgM0RfAAAADZH8AEAANgcwQcAAGBzBB8AAIDNEXwAAAA2R/ABAADYHMEHAABgcwQ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nt801Ngc5zShc9xihcWwxE+WEJeSbUunLeK2ANgD/85xbtvo+klgCSCDxawdk+xzn36K20/UG56CgB4T2W+9PIMacdHppcABB/Men1tji6fv1pFVfWmpwCA9zVUS29cLq15zvQSBLkw0wMQnBqdLj24+Du9sirb9BQA8C23S1ryG6l4j3T6XJ7XByMIPvhdaXW9/ve1jfp6d5HpKQDgP2vmSWW50oXzpfBo02sQZPhlBvw
"text/plain": [
"<Figure size 800x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(8, 8))\n",
"df[\"Outcome\"][0:500].value_counts().plot.pie(autopct='%1.1f%%', startangle=90, pctdistance=1.25, labeldistance=.8)\n",
"plt.ylabel('')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Н а данной круговой диаграмме видим высокую смертность из-за сахарного диабета, из-за него умерло треть населения. "
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}