AIM-PIbd-32-Kaznacheeva-E-K/lab_1/Lab1.ipynb

185 lines
126 KiB
Plaintext
Raw Normal View History

2024-09-19 16:11:49 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Начало лабораторной\n",
"\n",
"Выгрузка данных из csv файла в датафрейм"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['work_year', 'experience_level', 'employment_type', 'job_title',\n",
" 'salary', 'salary_currency', 'salary_in_usd', 'employee_residence',\n",
" 'remote_ratio', 'company_location', 'company_size'],\n",
" dtype='object')\n"
]
}
],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\"..//static//csv//ds_salaries.csv\")\n",
"print(df.columns)"
]
2024-10-12 09:49:04 +04:00
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['work_year', 'experience_level', 'employment_type', 'job_title',\n",
" 'salary', 'salary_currency', 'salary_in_usd', 'employee_residence',\n",
" 'remote_ratio', 'company_location', 'company_size'],\n",
" dtype='object')\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA2wAAAIjCAYAAAB/FZhcAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABhjUlEQVR4nO3deXgNd///8dcJchKyWEKWCmKpfSnaCGppcwtNW1RbVWqpom20SG9Ub2Lr9+am1qKptraWUl100aqg9tAKqVrqRi1tSWiR2BPJ/P7wy9yOBDlxItPm+biuua7MfN5nzntOzsHLzHyOzTAMQwAAAAAAy3Er6AYAAAAAADkjsAEAAACARRHYAAAAAMCiCGwAAAAAYFEENgAAAACwKAIbAAAAAFgUgQ0AAAAALIrABgAAAAAWRWADAAAAAIsisAEAAACARRHYAOD/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bgELNx8dHQUFB2rVrl0v3mzWhQbdu3dSjR48ca+rVq+ewfvjwYVWoUCFXZ7kqVaqkd955x2Hb0qVLs4XDcePG6ffff9fzzz9/0/3ltu5G7r33XsXFxen06dP64IMP9Oyzzyo4OFiNGzdWRkaG/vGPf+jUqVMaOnSoatSooRIlSuj3339Xz549cz35w+1KSkpSxYoVb1rz5JNPavPmzRo8eLAaNGggLy8vZWZmqm3btk73aZXjzo2nnnpKgwYN0sKFC/Xaa6/pgw8+UOPGjXMMK67m7++vDz74QNLVUDF
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"import pandas as pd\n",
"df = pd.read_csv(\"..//static//csv//ds_salaries.csv\")\n",
"print(df.columns)\n",
"\n",
"# Группировка данных по уровню опыта и вычисление средней зарплаты\n",
"avg_salary_by_exp = df.groupby('experience_level')['salary_in_usd'].mean().reset_index()\n",
"\n",
"# Создание столбчатой диаграммы\n",
"plt.figure(figsize=(10, 6))\n",
"sns.barplot(x='experience_level', y='salary_in_usd', data=avg_salary_by_exp)\n",
"plt.title('Средняя зарплата по уровню опыта')\n",
"plt.xlabel('Уровень опыта')\n",
"plt.ylabel('Средняя зарплата (USD)')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"По данной диаграмме можно сделать вывод, что у работников Executive-level зарплата выше всех, а у Entry-level зарплата ниже всех"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1IAAAIjCAYAAAAJLyrXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACD60lEQVR4nOzdd3wUdeLG8WdbNr2ThJAEAgRCB4NAsKCAomI5u56op95ZDrunnr2dh+V+Kme/0xPPcigqVkQRBSwo0lvoJZS0JaSXTXbn90dgNVITksxu8nm/XivZ2dmZZ8Ma9sl35jsWwzAMAQAAAAAOm9XsAAAAAAAQaChSAAAAANBEFCkAAAAAaCKKFAAAAAA0EUUKAAAAAJqIIgUAAAAATUSRAgAAAIAmokgBAAAAQBNRpAAAAACgiShSAAAAANBEFCkAaCNTpkyRxWLx3YKDg9WrVy9df/31KigoMDseAABoArvZAQCgo3n44YeVnp6umpoafffdd3rxxRc1Y8YMrVy5UqGhoWbHAwAAh4EiBQBt7NRTT9XQoUMlSX/84x8VFxenp556Sh999JEuvvhik9MBAIDDwaF9AGCy0aNHS5I2b94sSSouLtZf/vIXDRgwQOHh4YqMjNSpp56qZcuW7fPcmpoaPfjgg+rVq5eCg4PVuXNnnXPOOdq4caMkacuWLY0OJ/zt7YQTTvBta86cObJYLHrnnXd09913KykpSWFhYTrzzDO1bdu2ffb9008/6ZRTTlFUVJRCQ0M1atQoff/99/t9jSeccMJ+9//ggw/us+6bb76prKwshYSEKDY2VhdddNF+93+w1/ZrXq9XzzzzjPr166fg4GAlJibqmmuu0e7duxut161bN51++un77Of666/fZ5v7y/7kk0/u8z2VpNraWj3wwAPq2bOnnE6nUlNTdccdd6i2tna/36tfu/baa5WRkaHQ0FDFxsZq9OjR+vbbbxut89FHH2n8+PFKTk6W0+lUjx499Mgjj8jj8TRa74QTTlD//v21aNEijRw5UiEhIUpPT9dLL73UaL2974MD3f7whz/sk/NAf79TpkzxrfPtt9/q/PPPV1pamu/7cMstt6i6utq3zh/+8IeD7ttisWjLli2H/L4BQFtgRAoATLa39MTFxUmSNm3apA8//FDnn3++0tPTVVBQoJdfflmjRo3S6tWrlZycLEnyeDw6/fTTNXv2bF100UW66aabVF5erlmzZmnlypXq0aOHbx8XX3yxTjvttEb7veuuu/ab59FHH5XFYtGdd96pwsJCPfPMMxo7dqyWLl2qkJAQSdLXX3+tU089VVlZWXrggQdktVr12muv+T7oDxs2bJ/tpqSkaNKkSZKkiooKXXfddfvd93333acLLrhAf/zjH1VUVKRnn31Wxx9/vJYsWaLo6Oh9nnP11VfruOOOkyR98MEHmj59eqPHr7nmGk2ZMkVXXHGFbrzxRm3evFnPPfeclixZou+//14Oh2O/34emKCkp8b22X/N6vTrzzDP13Xff6eqrr1afPn20YsUKPf3001q3bp0+/PDDg27X7XZrwoQJSklJUXFxsV5++WWdcsopysnJUVpamqSGc+/Cw8N16623Kjw8XF9//bXuv/9+lZWV6cknn2y0vd27d+u0007TBRdcoIsvvljvvvuurrvuOgUFBenKK69stO6NN96oo48+utGyP/7xjwfMmpmZqXvuuUeS5HK5dMsttzR6fNq0aaqqqtJ1112nuLg4LViwQM8++6y2b9+uadOmSWr4uxo7dqzvOZdeeqnOPvtsnXPOOb5lnTp1Ouj3DADajAEAaBOvvfaaIcn46quvjKKiImPbtm3G1KlTjbi4OCMkJMTYvn27YRiGUVNTY3g8nkbP3bx5s+F0Oo2HH37Yt+w///mPIcl46qmn9tmX1+v1PU+S8eSTT+6zTr9+/YxRo0b57n/zzTeGJKNLly5GWVmZb/m7775rSDImT57s23ZGRoYxbtw4334MwzCqqqqM9PR046STTtpnXyNHjjT69+/vu19UVGRIMh544AHfsi1bthg2m8149NFHGz13xYoVht1u32f5+vXrDUnG66+/7lv2wAMPGL/+p+3bb781JBlvvfVWo+fOnDlzn+Vdu3Y1xo8fv0/2iRMnGr/95/K32e+44w4jISHByMrKavQ9feONNwyr1Wp8++23jZ7/0ksvGZKM77//fp/9HcyCBQsMScZ7773nW1ZVVbXPetdcc40RGhpq1NTU+JaNGjXKkGT83//9n29ZbW2tMXjwYCMhIcFwu92GYfzyPpg2bdo+2w0LCzMuv/zyfZYfc8wxxoknnui7v/d999prrx0056RJkwyLxWJs3bp1v6/3t99nAPAnHNoHAG1s7Nix6tSpk1JTU3XRRRcpPDxc06dPV5cuXSRJTqdTVmvDj2ePx6Ndu3YpPDxcvXv31uLFi33bef/99xUfH68bbrhhn3389lC0prjssssUERHhu3/eeeepc+fOmjFjhiRp6dKlWr9+vX7/+99r165dcrlccrlcqqys1JgxYzRv3jx5vd5G26ypqVFwcPBB9/vBBx/I6/Xqggsu8G3T5XIpKSlJGRkZ+uabbxqt73a7JTV8vw5k2rRpioqK0kknndRom1lZWQoPD99nm3V1dY3Wc7lcqqmpOWjuHTt26Nlnn9V9992n8PDwffbfp08fZWZmNtrm3sM5f7v//ampqZHL5VJOTo4mT56skJAQ3zl2knyjhJJUXl4ul8ul4447TlVVVVqzZk2jbdntdl1zzTW++0FBQbrmmmtUWFioRYsWHTLLgbjd7oP+Pfw2Z2VlpVwul0aOHCnDMLRkyZJm7xsAzMKhfQDQxp5//nn16tVLdrtdiYmJ6t27t684SQ2Hg02ePFkvvPCCNm/e3Ohcl72H/0kNhwT27t1bdnvL/ijPyMhodN9isahnz56+c1PWr18vSbr88ssPuI3S0lLFxMT47rtcrn22+1vr16+XYRgHXO+3h+CVlJRI0j7l5bfbLC0tVUJCwn4fLywsbHT/yy+/bPKhYw888ICSk5N1zTXX6L333ttn/zk5OQfc5m/3vz9TpkzxHQaZlJSkWbNmqWvXrr7HV61apXvvvVdff/21ysrKGj23tLS00f3k5GSFhYU1WtarVy9JDeecjRgx4pB59qekpKRRpv3Jzc3V/fffr48//nif89N+mxMAAgFFCgDa2LBhwxqNKPzW3//+d91333268sor9cgjjyg2NlZWq1U333zzPiM9Ztib4cknn9TgwYP3u86vy43b7VZeXp5OOumkQ27XYrHo888/l81mO+g2JSk/P19SQ7k42DYTEhL01ltv7ffx3xac4cOH629/+1ujZc8995w++uij/T4/JydHU6ZM0Ztvvrnfc628Xq8GDBigp556ar/PT01NPWD2vc444wz17NlThYWFeumll3ThhRfqu+++U7du3VRSUqJRo0YpMjJSDz/8sHr06KHg4GAtXrxYd955Z5u9X/Lz8zVu3LgDPu7xeHTSSSepuLhYd955pzIzMxUWFqYdO3boD3/4g1+8rwGgqShSAOBn3nvvPZ144ol69dVXGy0vKSlRfHy8736PHj30008/qa6urkUmTNhr74jTXoZhaMOGDRo4cKBvv5IUGRnZaGKAA1m2bJnq6uoOWh73btcwDKWnp/tGSQ5m9erVslgs6t2790G3+dVXX+mYY45pdGjZgcTHx+/zmg42IcRdd92lwYMH68ILLzzg/pctW6YxY8Y0+3DLLl26+A77POeccxQfH68XX3xRjz/+uObMmaNdu3bpgw8+0PHHH+97zt4ZIH9r586dqqysbDQqtW7dOkkNsxY2x/bt21VeXq4+ffoccJ0VK1Zo3bp1ev3113XZZZf5ls+aNatZ+wQAf8A5UgDgZ2w2mwzDaLRs2rRp2rFjR6Nl5557rlwul5577rl9tvHb5zfFf//7X5WXl/vuv/fee8rLy9Opp54qScrKylKPHj30j3/8QxUVFfs8v6ioaJ/sNpttv1OL/9o555wjm82mhx56aJ/8hmFo165dvvv19fV6//33NWzYsIMe2nf
"text/plain": [
"<Figure size 1000x600 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"plt.figure(figsize=(10, 6))\n",
"sns.histplot(df['salary_in_usd'], bins=30, kde=True)\n",
"plt.title('Распределение зарплат')\n",
"plt.xlabel('Зарплата (USD)')\n",
"plt.ylabel('Частота')\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Средняя зарплата составляет 150000 USD"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAnwAAAKSCAYAAABIowakAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACDWUlEQVR4nO3dd3hTZQMF8JPRpHtvWtqy9waVjSJDkKUgDgSUoaIIuDein3sgKuAEFBwgiIqICC5Q2XsX2qa0dO+VNON+f1QqpaUzyZvcnN/z5IGm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vb2+0bdsWBw4cqJzP+vXrERwcjAceeKDaMppytuWdd94JHx+fyq9vvvlmREREYPPmzQCAQ4cOIT4+HrfddhtycnKQnZ2N7OxslJSU4LrrrsOff/4Ji8VSZZ56vR7u7u61LnfDhg2wWCyYNGlS5Tyzs7MRHh6O1q1bV9s9WV5eDqDi9bqSdevWwc/PD9dff32Vefbs2RPe3t7V5mk0GqtMl52dDb1eX2vu1NRUvPvuu3jmmWeq7fpZt24d2rdvj3bt2lWZ58Xd+JcvvyZqtRqzZ8+u/Fqj0WD27NnIzMzE/v37AQAqlQoajQZAxVbF3NxcmEwm9OrVq8p75qJHHnmkytfz58+HSqWq3KW4bds2lJeXY968eZXvRQCYOXMmfH1967XrsSZ6vb7a62s0Gmt9zP79+7Fu3Tq8/PLLVbJ
"text/plain": [
"<Figure size 800x800 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"# Подсчет количества работников по уровню опыта\n",
"experience_counts = df['experience_level'].value_counts()\n",
"\n",
"# Создание круговой диаграммы\n",
"plt.figure(figsize=(8, 8))\n",
"plt.pie(experience_counts, labels=experience_counts.index, autopct='%1.1f%%', startangle=140)\n",
"\n",
"# Настройка заголовка\n",
"plt.title('Распределение работников по уровню опыта')\n",
"\n",
"# Отображение диаграммы\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"По данной диаграмме можно сделать вывод, что большую часть сотрудников составляют Senior-level"
]
2024-09-19 16:11:49 +04:00
}
],
"metadata": {
"kernelspec": {
"display_name": "aimenv",
"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
}