AIM-PIbd-31-Potapov-N-S/lab_1/lab1.ipynb

420 lines
145 KiB
Plaintext
Raw Normal View History

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<img src=\"static\\\\swagger.png\" style=\"height: 400px;\">"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Импортируем библиотеку `pandas` и загружаем датасет (разделителем указываем точку с запятой)"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\"csv\\\\dataset25.csv\", sep=\";\")\n",
"\n",
"df[\"Valuation ($B) \"] = pd.to_numeric(df[\"Valuation ($B) \"].str.slice(0, -4).str.replace(\",\", \".\"))\n",
"df[\"Total Funding\"] = pd.to_numeric(df[\"Total Funding\"].str.slice(1, -2).str.replace(\",\", \"\"))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Посмотрим краткое содержание датасета. Видим, что датасет состоит из 100 строк и 10 столбцов"
]
},
{
"cell_type": "code",
"execution_count": 29,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"RangeIndex: 100 entries, 0 to 99\n",
"Data columns (total 10 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Company 100 non-null object \n",
" 1 Valuation ($B) 100 non-null float64\n",
" 2 Country 100 non-null object \n",
" 3 State 79 non-null object \n",
" 4 City 99 non-null object \n",
" 5 Industries 99 non-null object \n",
" 6 Founded Year 100 non-null int64 \n",
" 7 Name of Founders 100 non-null object \n",
" 8 Total Funding 100 non-null float64\n",
" 9 Number of Employees 100 non-null object \n",
"dtypes: float64(2), int64(1), object(7)\n",
"memory usage: 7.9+ KB\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>Company</th>\n",
" <th>Valuation ($B)</th>\n",
" <th>Country</th>\n",
" <th>State</th>\n",
" <th>City</th>\n",
" <th>Industries</th>\n",
" <th>Founded Year</th>\n",
" <th>Name of Founders</th>\n",
" <th>Total Funding</th>\n",
" <th>Number of Employees</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Bytedance</td>\n",
" <td>140.0</td>\n",
" <td>China</td>\n",
" <td>Beijing</td>\n",
" <td>Beijing</td>\n",
" <td>Content, Data Mining, Internet</td>\n",
" <td>2012</td>\n",
" <td>Yiming Zhang</td>\n",
" <td>7440.0</td>\n",
" <td>10.000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>SpaceX</td>\n",
" <td>100.3</td>\n",
" <td>United States</td>\n",
" <td>California</td>\n",
" <td>Hawthorne</td>\n",
" <td>Aerospace, Manufacturing, Space Travel, Transp...</td>\n",
" <td>2002</td>\n",
" <td>Elon Musk</td>\n",
" <td>383.0</td>\n",
" <td>5,000-10,000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Stripe</td>\n",
" <td>95.0</td>\n",
" <td>United States</td>\n",
" <td>California</td>\n",
" <td>San Francisco</td>\n",
" <td>Finance, FinTech, Mobile Payments, SaaS</td>\n",
" <td>2010</td>\n",
" <td>John Collison, Patrick Collison</td>\n",
" <td>300.0</td>\n",
" <td>1,000-5,000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Klarna</td>\n",
" <td>45.6</td>\n",
" <td>Sweden</td>\n",
" <td>NaN</td>\n",
" <td>Stockholm</td>\n",
" <td>E-Commerce, FinTech, Payments, Shopping</td>\n",
" <td>2005</td>\n",
" <td>Niklas Adalberth, Sebastian Siemiatkowski, Vic...</td>\n",
" <td>3471.7</td>\n",
" <td>5,000-10,000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Epic Games</td>\n",
" <td>42.0</td>\n",
" <td>United States</td>\n",
" <td>North Carolina</td>\n",
" <td>Cary</td>\n",
" <td>Developer Platform, Gaming, Software, Video Games</td>\n",
" <td>1991</td>\n",
" <td>Mark Rein, Tim Sweeney</td>\n",
" <td>544.9</td>\n",
" <td>1,000-5,000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Company Valuation ($B) Country State City \\\n",
"0 Bytedance 140.0 China Beijing Beijing \n",
"1 SpaceX 100.3 United States California Hawthorne \n",
"2 Stripe 95.0 United States California San Francisco \n",
"3 Klarna 45.6 Sweden NaN Stockholm \n",
"4 Epic Games 42.0 United States North Carolina Cary \n",
"\n",
" Industries Founded Year \\\n",
"0 Content, Data Mining, Internet 2012 \n",
"1 Aerospace, Manufacturing, Space Travel, Transp... 2002 \n",
"2 Finance, FinTech, Mobile Payments, SaaS 2010 \n",
"3 E-Commerce, FinTech, Payments, Shopping 2005 \n",
"4 Developer Platform, Gaming, Software, Video Games 1991 \n",
"\n",
" Name of Founders Total Funding \\\n",
"0 Yiming Zhang 7440.0 \n",
"1 Elon Musk 383.0 \n",
"2 John Collison, Patrick Collison 300.0 \n",
"3 Niklas Adalberth, Sebastian Siemiatkowski, Vic... 3471.7 \n",
"4 Mark Rein, Tim Sweeney 544.9 \n",
"\n",
" Number of Employees \n",
"0 10.000 \n",
"1 5,000-10,000 \n",
"2 1,000-5,000 \n",
"3 5,000-10,000 \n",
"4 1,000-5,000 "
]
},
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.info()\n",
"df.head()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Выведем названия столбцов для удобства"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Index(['Company', 'Valuation ($B) ', 'Country', 'State', 'City', 'Industries',\n",
" 'Founded Year', 'Name of Founders', 'Total Funding',\n",
" 'Number of Employees'],\n",
" dtype='object')"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.columns"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Круговая диаграмма показывает распределение компаний по странам"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: ylabel='count'>"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAdYAAAGFCAYAAABAANIDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAACk4UlEQVR4nOzdeVhUdRfA8e+dAWaGHdlXERVExX1JzV1TM7M0LbXSSsvKzMqyzbJ627XU9rRSs7LFpUUz933BDdwQEUFQ2fdhZ+a+fxCTyDbAwID+Ps/j88bMnXsPvDBn7m85R5JlWUYQBEEQBJNQmDsAQRAEQbiRiMQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxCoIgCIIJicQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxCoIgCIIJicQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxCoIgCIIJicQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxCoIgCIIJicQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxCoIgCIIJicQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxCoIgCIIJicQqCIIgCCYkEqsgCIIgmJBIrIIgCIJgQiKxNgP+/v4sXry4Qc4tSRIbNmxokHMLgiDcjERibSCDBg1izpw5FR5fsWIFjo6OtTrXkSNHePTRRw1fN2YyTElJ4fHHH8fPzw+VSoWHhwcjRoxg//799Y6nIT8wCIIgmIuFuQMQaubq6mq2a48fP56ioiJWrlxJQEAASUlJbN++nbS0NLPFJAiC0JSJO1YzmzZtGnfddRcLFy7E09MTZ2dnnnzySYqLiw3HXHtn5+/vD8Ddd9+NJEmGrwF+//13unXrhlqtJiAggDfeeIOSkhLD81FRUQwYMAC1Wk379u3ZunVrtbFlZmayd+9e3n//fQYPHkzLli3p1asXL730EnfeeWe18URHRzN27Fjc3d2xtbWlZ8+ebNu2zXDuQYMGcenSJZ555hkkSUKSJMNz+/bto3///mg0Gnx9fZk9eza5ubmG5z///HPatm2LWq3G3d2de+65x+iftyAIQkMTibUJ2LlzJ9HR0ezcuZOVK1eyYsUKVqxYUemxR44cAeC7774jISHB8PXevXt58MEHefrppzl79ixfffUVK1as4O233wZAr9czbtw4rKysOHz4MF9++SXz5s2rNi5bW1tsbW3ZsGEDhYWFtYpHq9Vy++23s337dk6cOMHIkSMZM2YMcXFxAKxbtw4fHx/efPNNEhISSEhIAEoT8siRIxk/fjwnT57k559/Zt++fcyaNQuAo0ePMnv2bN58800iIyPZvHkzAwYMMPZHLQiC0PBkoUEMHDhQfvrppys8/t1338kODg6Gr6dOnSq3bNlSLikpMTw2YcIE+d577zV83bJlS/njjz82fA3I69evL3feoUOHyu+88065x77//nvZ09NTlmVZ/ueff2QLCwv5ypUrhuf//vvvSs91rd9++012cnKS1Wq13LdvX/mll16Sw8PDyx1T0znKdOjQQf7kk0+q/L5kWZYfeeQR+dFHHy332N69e2WFQiHn5+fLa9eule3t7eXs7OwarycIgmAO4o61CejQoQNKpdLwtaenJ8nJybU6R3h4OG+++abhLtPW1pYZM2aQkJBAXl4eERER+Pr64uXlZXhNnz59ajzv+PHjuXr1Kn/88QcjR45k165ddOvWrco76jJarZa5c+cSHByMo6Mjtra2REREGO5Yq/s+VqxYUe77GDFiBHq9npiYGIYPH07Lli0JCAjggQce4IcffiAvL8+on5EgCEJjEIuXGoi9vT1ZWVkVHs/M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7o1m+N4b8YlEdSTCOt6O
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df[\"Country\"].value_counts().plot.pie()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Стоимость 10 самых дорогих компаний"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[Text(0, 0, 'Bytedance'),\n",
" Text(1, 0, 'SpaceX'),\n",
" Text(2, 0, 'Stripe'),\n",
" Text(3, 0, 'Klarna'),\n",
" Text(4, 0, 'Epic Games'),\n",
" Text(5, 0, 'Canva'),\n",
" Text(6, 0, 'Checkout.com'),\n",
" Text(7, 0, 'Instacart'),\n",
" Text(8, 0, 'Databricks'),\n",
" Text(9, 0, 'Revolut'),\n",
" Text(10, 0, 'FTX')]"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAigAAAHyCAYAAADBQDVRAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABZ3klEQVR4nO3dd1RU18IF8D2A9KoiRamKHSuJNVaeHTXqswSN3cRYY/cZe8H4osYWMTY0iZoYxWhiNIrYsARFxYIdEZWiEkBQinC+P/yc5zggoMA9g/u31qwV7r2MGwIzm3vPPUclhBAgIiIikoie0gGIiIiIXseCQkRERNJhQSEiIiLpsKAQERGRdFhQiIiISDosKERERCQdFhQiIiKSDgsKERERScdA6QBvIzs7Gw8ePICFhQVUKpXScYiIiCgfhBB48uQJHB0doaf35nMkOllQHjx4ACcnJ6VjEBER0VuIjo5GhQoV3niMThYUCwsLAC++QEtLS4XTEBERUX4kJyfDyclJ/T7+JjpZUF5e1rG0tGRBISIi0jH5GZ7BQbJEREQkHRYUIiIikg4LChERE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7766ivx6aefii5duqiPad68uRgzZoz64/v374s2bdoIMzMz4eHhIfbu3SusrKzExo0b1cdMnDhRlClTRpibm4tevXqJpUuXCisrK/X+tLQ00b17d2FtbS0AqD8XgAgMDFQfFx4eLlq2bCmMjY1F6dKlxdChQ8WTJ0/U+/v376+RVQghxowZI5o3b/7G78ekSZNE79691R8/efJEjBo
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plot = df.loc[0:10][[\"Company\", \"Valuation ($B) \"]].plot.bar(color=[\"blue\"])\n",
"plot.set_xticklabels(df.loc[0:10][\"Company\"])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Гистограмма распределение количества компаний по году основания. Диаграмма показывает, что больше всего самых дорогих компаний было основано в период между 2012 и 2015 годом."
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: xlabel='Founded Year'>"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAh8AAAHGCAYAAADUhOmrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA6TklEQVR4nO3de3iMd/7/8fdMRiYHSRCHJCSi6kydaVCH1llRam13LXFaq7TqUIe0DtV1rN1vdUvZntDS1m6r2qpquwhCnRvUIQml4pi1JZGoIHn//nCZX4eEe7hzZ6LPx3Xd12Xmc8/r/syYmbxy3/dkbKqqAgAAYBF7YU8AAAD8tlA+AACApSgfAADAUpQPAABgKcoHAACwFOUDAABYivIBAAAsRfkAAACWchT2BG6Wm5srp06dkqCgILHZbIU9HQAAYICqysWLFyUiIkLs9tvv2/C68nHq1CmJjIws7GkAAIC7kJqaKhUqVLjtOl5XPoKCgkTk+uSDg4MLe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ilCpVSqKiomTkyJEybdo0qVKlilSqVEkmTZokERER8sQTT5g5bwAAUER5XD527twpbdq0cV0ePXq0iIjExsbK4sWLZdy4cZKVlSVDhgyRCxcuSIsWLWTNmjXi5+dn3qwBAECR5XH5aN26tahqvuM2m01efvllefnll+9pYgAA4P5U6J92AQAAvy2UDwAAYCnKBwAAsBTlAwAAWIryAQAALEX5AAAAlqJ8AAA
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df[\"Founded Year\"].value_counts().sort_index().plot.bar()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Точечная диаграмма показывает распределение стоимости компании от количества работников. Из диаграммы видно, что больше всего компаний, у которых в штате от 1000 до 5000 человек."
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: xlabel='Number of Employees', ylabel='Valuation ($B) '>"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA+0AAAFzCAYAAABLtOgJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABTUklEQVR4nO3deXxU1f3/8fdkT4AkZCdCAkhYBIQgghGNCqkgCkWpKKWKSLVWEClIW75VUKqCuEtxrRL5VeGndQMXLGXVNCACUVmMAcJiISEhJCGJhJCc3x/+Ml8GskzIJHMneT0fj3k8MufcufOZuXNP5jPn3HNsxhgjAAAAAABgOV7uDgAAAAAAANSMpB0AAAAAAIsiaQcAAAAAwKJI2gEAAAAAsCiSdgAAAAAALIqkHQAAAAAAiyJpBwAAAADAokjaAQAAAACwKB93B2AFVVVVOnz4sNq1ayebzebucAAAAAAALZwxRidOnFBsbKy8vGrvTydpl3T48GF16tTJ3WEAAAAAAFqZ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FyskJAQFRUVKTg4uEleH1q+21//Sml78lV5xinlbbNpSLcILZ08yI2RAQAAALAaZ/NQy17Tnp2drZycHKWkpNjLQkJCNHjwYKWnp0uS0tPTFRoaak/YJSklJUVeXl7avHlzrfsuLy9XcXGxww1ojH15JdqYleeQsEtSpTHamJXHUHkAAAAA58WySXtOTo4kKTo62qE8OjraXpeTk6OoqCiHeh8fH4WFhdm3qcn8+fMVEhJ
"text/plain": [
"<Figure size 1200x400 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df.plot.scatter(x=\"Number of Employees\", y=\"Valuation ($B) \", figsize=(12, 4))"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}