ISEbd-31_Musatkina_K_Y_mii/lab1.ipynb

3361 lines
1.3 MiB
Plaintext
Raw Normal View History

2024-09-28 11:16:58 +04:00
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"загрузка и сохранение данных"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"df = pd.read_csv(\"mobile_phone_price_prediction.csv\", index_col=\"Name\")\n",
"df.to_csv(\"test.csv\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"получение сведений о датафрейме с данными"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'pandas.core.frame.DataFrame'>\n",
"Index: 1370 entries, Samsung Galaxy F14 5G to TCL Trifold\n",
"Data columns (total 17 columns):\n",
" # Column Non-Null Count Dtype \n",
"--- ------ -------------- ----- \n",
" 0 Unnamed: 0 1370 non-null int64 \n",
" 1 Rating 1370 non-null float64\n",
" 2 Spec_score 1370 non-null int64 \n",
" 3 No_of_sim 1370 non-null object \n",
" 4 Ram 1370 non-null object \n",
" 5 Battery 1370 non-null object \n",
" 6 Display 1370 non-null object \n",
" 7 Camera 1370 non-null object \n",
" 8 External_Memory 1370 non-null object \n",
" 9 Android_version 927 non-null object \n",
" 10 Price 1370 non-null object \n",
" 11 company 1370 non-null object \n",
" 12 Inbuilt_memory 1351 non-null object \n",
" 13 fast_charging 1281 non-null object \n",
" 14 Screen_resolution 1368 non-null object \n",
" 15 Processor 1342 non-null object \n",
" 16 Processor_name 1370 non-null object \n",
"dtypes: float64(1), int64(2), object(14)\n",
"memory usage: 192.7+ KB\n"
]
}
],
"source": [
"df.info()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"получение сведений о колонках датафрейма"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Index(['Unnamed: 0', 'Rating', 'Spec_score', 'No_of_sim', 'Ram', 'Battery',\n",
" 'Display', 'Camera', 'External_Memory', 'Android_version', 'Price',\n",
" 'company', 'Inbuilt_memory', 'fast_charging', 'Screen_resolution',\n",
" 'Processor', 'Processor_name'],\n",
" dtype='object')\n"
]
}
],
"source": [
"print(df.columns)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"вывод строк и столбцов из датафрейма"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"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>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Samsung Galaxy F14 5G</th>\n",
" <td>4.65</td>\n",
" <td>68</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A11</th>\n",
" <td>4.20</td>\n",
" <td>63</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A13</th>\n",
" <td>4.30</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy F23</th>\n",
" <td>4.10</td>\n",
" <td>73</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A03s (4GB RAM + 64GB)</th>\n",
" <td>4.10</td>\n",
" <td>69</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40R</th>\n",
" <td>4.05</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XL NxtPaper 5G</th>\n",
" <td>4.10</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XE NxtPaper 5G</th>\n",
" <td>4.00</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40 NxtPaper 5G</th>\n",
" <td>4.50</td>\n",
" <td>79</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL Trifold</th>\n",
" <td>4.65</td>\n",
" <td>93</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G,</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1370 rows × 3 columns</p>\n",
"</div>"
],
"text/plain": [
" Rating Spec_score \\\n",
"Name \n",
"Samsung Galaxy F14 5G 4.65 68 \n",
"Samsung Galaxy A11 4.20 63 \n",
"Samsung Galaxy A13 4.30 75 \n",
"Samsung Galaxy F23 4.10 73 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4.10 69 \n",
"... ... ... \n",
"TCL 40R 4.05 75 \n",
"TCL 50 XL NxtPaper 5G 4.10 80 \n",
"TCL 50 XE NxtPaper 5G 4.00 80 \n",
"TCL 40 NxtPaper 5G 4.50 79 \n",
"TCL Trifold 4.65 93 \n",
"\n",
" No_of_sim \n",
"Name \n",
"Samsung Galaxy F14 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Samsung Galaxy A11 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy A13 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy F23 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Dual Sim, 3G, 4G, VoLTE, \n",
"... ... \n",
"TCL 40R Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL 50 XL NxtPaper 5G Dual Sim, 3G, 4G, VoLTE, \n",
"TCL 50 XE NxtPaper 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL 40 NxtPaper 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL Trifold Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G, \n",
"\n",
"[1370 rows x 3 columns]"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[[\"Rating\", \"Spec_score\", \"No_of_sim\"]]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"вывод первых строк"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Unnamed: 0 Rating Spec_score \\\n",
"Name \n",
"Samsung Galaxy F14 5G 0 4.65 68 \n",
"Samsung Galaxy A11 1 4.20 63 \n",
"Samsung Galaxy A13 2 4.30 75 \n",
"Samsung Galaxy F23 3 4.10 73 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4 4.10 69 \n",
"\n",
" No_of_sim Ram \\\n",
"Name \n",
"Samsung Galaxy F14 5G Dual Sim, 3G, 4G, 5G, VoLTE, 4 GB RAM \n",
"Samsung Galaxy A11 Dual Sim, 3G, 4G, VoLTE, 2 GB RAM \n",
"Samsung Galaxy A13 Dual Sim, 3G, 4G, VoLTE, 4 GB RAM \n",
"Samsung Galaxy F23 Dual Sim, 3G, 4G, VoLTE, 4 GB RAM \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Dual Sim, 3G, 4G, VoLTE, 4 GB RAM \n",
"\n",
" Battery Display \\\n",
"Name \n",
"Samsung Galaxy F14 5G 6000 mAh Battery 6.6 inches \n",
"Samsung Galaxy A11 4000 mAh Battery 6.4 inches \n",
"Samsung Galaxy A13 5000 mAh Battery 6.6 inches \n",
"Samsung Galaxy F23 6000 mAh Battery 6.4 inches \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 5000 mAh Battery 6.5 inches \n",
"\n",
" Camera \\\n",
"Name \n",
"Samsung Galaxy F14 5G 50 MP + 2 MP Dual Rear &amp; 13 MP Front Camera \n",
"Samsung Galaxy A11 13 MP + 5 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"Samsung Galaxy A13 50 MP Quad Rear &amp; 8 MP Front Camera \n",
"Samsung Galaxy F23 48 MP Quad Rear &amp; 13 MP Front Camera \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 13 MP + 2 MP + 2 MP Triple Rear &amp; 5 MP Fro... \n",
"\n",
" External_Memory \\\n",
"Name \n",
"Samsung Galaxy F14 5G Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A11 Memory Card Supported, upto 512 GB \n",
"Samsung Galaxy A13 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy F23 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Memory Card Supported, upto 1 TB \n",
"\n",
" Android_version Price company \\\n",
"Name \n",
"Samsung Galaxy F14 5G 13 9,999 Samsung \n",
"Samsung Galaxy A11 10 9,990 Samsung \n",
"Samsung Galaxy A13 12 11,999 Samsung \n",
"Samsung Galaxy F23 12 11,999 Samsung \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 11 11,999 Samsung \n",
"\n",
" Inbuilt_memory fast_charging \\\n",
"Name \n",
"Samsung Galaxy F14 5G 128 GB inbuilt 25W Fast Charging \n",
"Samsung Galaxy A11 32 GB inbuilt 15W Fast Charging \n",
"Samsung Galaxy A13 64 GB inbuilt 25W Fast Charging \n",
"Samsung Galaxy F23 64 GB inbuilt NaN \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 64 GB inbuilt 15W Fast Charging \n",
"\n",
" Screen_resolution \\\n",
"Name \n",
"Samsung Galaxy F14 5G 2408 x 1080 px Display with Water Drop Notch \n",
"Samsung Galaxy A11 720 x 1560 px Display with Punch Hole \n",
"Samsung Galaxy A13 1080 x 2408 px Display with Water Drop Notch \n",
"Samsung Galaxy F23 720 x 1600 px \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 720 x 1600 px Display with Water Drop Notch \n",
"\n",
" Processor Processor_name \n",
"Name \n",
"Samsung Galaxy F14 5G Octa Core Processor Exynos 1330 \n",
"Samsung Galaxy A11 1.8 GHz Processor Octa Core \n",
"Samsung Galaxy A13 2 GHz Processor Octa Core \n",
"Samsung Galaxy F23 Octa Core Helio G88 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Octa Core Helio P35 \n"
]
}
],
"source": [
"print(df.head())"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"вывод строк по условию"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"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>Rating</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Samsung Galaxy F14 5G</th>\n",
" <td>4.65</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A11</th>\n",
" <td>4.20</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A13</th>\n",
" <td>4.30</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy F23</th>\n",
" <td>4.10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A03s (4GB RAM + 64GB)</th>\n",
" <td>4.10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40R</th>\n",
" <td>4.05</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XL NxtPaper 5G</th>\n",
" <td>4.10</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XE NxtPaper 5G</th>\n",
" <td>4.00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40 NxtPaper 5G</th>\n",
" <td>4.50</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL Trifold</th>\n",
" <td>4.65</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1370 rows × 1 columns</p>\n",
"</div>"
],
"text/plain": [
" Rating\n",
"Name \n",
"Samsung Galaxy F14 5G 4.65\n",
"Samsung Galaxy A11 4.20\n",
"Samsung Galaxy A13 4.30\n",
"Samsung Galaxy F23 4.10\n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4.10\n",
"... ...\n",
"TCL 40R 4.05\n",
"TCL 50 XL NxtPaper 5G 4.10\n",
"TCL 50 XE NxtPaper 5G 4.00\n",
"TCL 40 NxtPaper 5G 4.50\n",
"TCL Trifold 4.65\n",
"\n",
"[1370 rows x 1 columns]"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[[\"Rating\"]]"
]
},
{
"cell_type": "code",
"execution_count": 35,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" <th>Ram</th>\n",
" <th>Battery</th>\n",
" <th>Display</th>\n",
" <th>Camera</th>\n",
" <th>External_Memory</th>\n",
" <th>Android_version</th>\n",
" <th>Price</th>\n",
" <th>company</th>\n",
" <th>Inbuilt_memory</th>\n",
" <th>fast_charging</th>\n",
" <th>Screen_resolution</th>\n",
" <th>Processor</th>\n",
" <th>Processor_name</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Vivo Y21T</th>\n",
" <td>118</td>\n",
" <td>3.95</td>\n",
" <td>74</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.51 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Vivo</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>18W Fast Charging</td>\n",
" <td>1600 x 720 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 680</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vivo Y66</th>\n",
" <td>125</td>\n",
" <td>3.75</td>\n",
" <td>53</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>3 GB RAM</td>\n",
" <td>3000 mAh Battery</td>\n",
" <td>5.5 inches</td>\n",
" <td>13 MP Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 128 GB</td>\n",
" <td>6.0 (Marshmallow)</td>\n",
" <td>NaN</td>\n",
" <td>Vivo</td>\n",
" <td>32 GB inbuilt</td>\n",
" <td>NaN</td>\n",
" <td>720 x 1280 px Display</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon MSM8937</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vivo V23 Pro 5G</th>\n",
" <td>146</td>\n",
" <td>3.90</td>\n",
" <td>85</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>4300 mAh Battery</td>\n",
" <td>6.56 inches</td>\n",
" <td>108 MP + 8 MP + 2 MP Triple Rear &amp;amp; 50 MP +...</td>\n",
" <td>Memory Card Not Supported</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Vivo</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>44W Fast Charging</td>\n",
" <td>1080 x 2376 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 1200</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Realme 8i</th>\n",
" <td>229</td>\n",
" <td>3.95</td>\n",
" <td>74</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 16 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 256 GB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Realme</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>18W Fast Charging</td>\n",
" <td>1080 x 2412 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio G96</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Realme 9 5G</th>\n",
" <td>259</td>\n",
" <td>3.95</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>48 MP + 2 MP + 2 MP Triple Rear &amp;amp; 16 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Realme</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>18W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 810 5G</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Realme 6i (6GB RAM + 64GB)</th>\n",
" <td>264</td>\n",
" <td>3.85</td>\n",
" <td>76</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>Helio G90T</td>\n",
" <td>6 GB RAM, 64 GB inbuilt</td>\n",
" <td>4300 mAh Battery with 30W Fast Charging</td>\n",
" <td>6.5 inches, 1080 x 2400 px, 90 Hz Display with...</td>\n",
" <td>48 MP Quad Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Realme</td>\n",
" <td>Octa Core</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>No Wifi</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Poco M4 Pro 5G</th>\n",
" <td>502</td>\n",
" <td>3.95</td>\n",
" <td>76</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 8 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Poco</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 810 5G</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Poco F4 5G</th>\n",
" <td>530</td>\n",
" <td>3.95</td>\n",
" <td>82</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>4500 mAh Battery</td>\n",
" <td>6.67 inches</td>\n",
" <td>64 MP + 8 MP + 2 MP Triple Rear &amp;amp; 20 MP Fr...</td>\n",
" <td>Android v12</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Poco</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>67W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 870</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Nothing Phone 1</th>\n",
" <td>619</td>\n",
" <td>3.95</td>\n",
" <td>85</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>4500 mAh Battery</td>\n",
" <td>6.55 inches</td>\n",
" <td>50 MP + 50 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Android v12</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Nothing</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 778G Plus</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy M34 5G</th>\n",
" <td>738</td>\n",
" <td>3.95</td>\n",
" <td>82</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>50 MP + 8 MP + 2 MP Triple Rear &amp;amp; 13 MP Fr...</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>25W Fast Charging</td>\n",
" <td>1080 x 2340 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Exynos 1280</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Realme Narzo 50</th>\n",
" <td>874</td>\n",
" <td>3.95</td>\n",
" <td>74</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 16 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 256 GB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Realme</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1080 x 2412 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio G96</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Motorola Moto G 5G</th>\n",
" <td>1002</td>\n",
" <td>3.90</td>\n",
" <td>82</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.67 inches</td>\n",
" <td>48 MP + 8 MP + 2 MP Triple Rear &amp;amp; 16 MP Fr...</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>10</td>\n",
" <td>NaN</td>\n",
" <td>Motorola</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>20W Fast Charging</td>\n",
" <td>1080 x 2400 px Display with Punch Hole</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 750G</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Xiaomi Redmi Note 12 5G</th>\n",
" <td>1148</td>\n",
" <td>3.90</td>\n",
" <td>77</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.67 inches</td>\n",
" <td>48 MP + 8 MP + 2 MP Triple Rear &amp;amp; 13 MP Fr...</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Xiaomi</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 4 Gen 1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 Rating Spec_score \\\n",
"Name \n",
"Vivo Y21T 118 3.95 74 \n",
"Vivo Y66 125 3.75 53 \n",
"Vivo V23 Pro 5G 146 3.90 85 \n",
"Realme 8i 229 3.95 74 \n",
"Realme 9 5G 259 3.95 75 \n",
"Realme 6i (6GB RAM + 64GB) 264 3.85 76 \n",
"Poco M4 Pro 5G 502 3.95 76 \n",
"Poco F4 5G 530 3.95 82 \n",
"Nothing Phone 1 619 3.95 85 \n",
"Samsung Galaxy M34 5G 738 3.95 82 \n",
"Realme Narzo 50 874 3.95 74 \n",
"Motorola Moto G 5G 1002 3.90 82 \n",
"Xiaomi Redmi Note 12 5G 1148 3.90 77 \n",
"\n",
" No_of_sim Ram \\\n",
"Name \n",
"Vivo Y21T Dual Sim, 3G, 4G, VoLTE, 4 GB RAM \n",
"Vivo Y66 Dual Sim, 3G, 4G, VoLTE, 3 GB RAM \n",
"Vivo V23 Pro 5G Dual Sim, 3G, 4G, 5G, VoLTE, 8 GB RAM \n",
"Realme 8i Dual Sim, 3G, 4G, VoLTE, 4 GB RAM \n",
"Realme 9 5G Dual Sim, 3G, 4G, 5G, VoLTE, 4 GB RAM \n",
"Realme 6i (6GB RAM + 64GB) Dual Sim, 3G, 4G, VoLTE, Helio G90T \n",
"Poco M4 Pro 5G Dual Sim, 3G, 4G, 5G, VoLTE, 4 GB RAM \n",
"Poco F4 5G Dual Sim, 3G, 4G, 5G, VoLTE, 6 GB RAM \n",
"Nothing Phone 1 Dual Sim, 3G, 4G, 5G, VoLTE, 8 GB RAM \n",
"Samsung Galaxy M34 5G Dual Sim, 3G, 4G, 5G, VoLTE, 6 GB RAM \n",
"Realme Narzo 50 Dual Sim, 3G, 4G, VoLTE, 4 GB RAM \n",
"Motorola Moto G 5G Dual Sim, 3G, 4G, 5G, VoLTE, 6 GB RAM \n",
"Xiaomi Redmi Note 12 5G Dual Sim, 3G, 4G, 5G, VoLTE, 4 GB RAM \n",
"\n",
" Battery \\\n",
"Name \n",
"Vivo Y21T 5000 mAh Battery \n",
"Vivo Y66 3000 mAh Battery \n",
"Vivo V23 Pro 5G 4300 mAh Battery \n",
"Realme 8i 5000 mAh Battery \n",
"Realme 9 5G 5000 mAh Battery \n",
"Realme 6i (6GB RAM + 64GB) 6 GB RAM, 64 GB inbuilt \n",
"Poco M4 Pro 5G 5000 mAh Battery \n",
"Poco F4 5G 4500 mAh Battery \n",
"Nothing Phone 1 4500 mAh Battery \n",
"Samsung Galaxy M34 5G 6000 mAh Battery \n",
"Realme Narzo 50 5000 mAh Battery \n",
"Motorola Moto G 5G 5000 mAh Battery \n",
"Xiaomi Redmi Note 12 5G 5000 mAh Battery \n",
"\n",
" Display \\\n",
"Name \n",
"Vivo Y21T 6.51 inches \n",
"Vivo Y66 5.5 inches \n",
"Vivo V23 Pro 5G 6.56 inches \n",
"Realme 8i 6.6 inches \n",
"Realme 9 5G 6.5 inches \n",
"Realme 6i (6GB RAM + 64GB) 4300 mAh Battery with 30W Fast Charging \n",
"Poco M4 Pro 5G 6.6 inches \n",
"Poco F4 5G 6.67 inches \n",
"Nothing Phone 1 6.55 inches \n",
"Samsung Galaxy M34 5G 6.5 inches \n",
"Realme Narzo 50 6.6 inches \n",
"Motorola Moto G 5G 6.67 inches \n",
"Xiaomi Redmi Note 12 5G 6.67 inches \n",
"\n",
" Camera \\\n",
"Name \n",
"Vivo Y21T 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"Vivo Y66 13 MP Rear &amp; 16 MP Front Camera \n",
"Vivo V23 Pro 5G 108 MP + 8 MP + 2 MP Triple Rear &amp; 50 MP +... \n",
"Realme 8i 50 MP + 2 MP + 2 MP Triple Rear &amp; 16 MP Fr... \n",
"Realme 9 5G 48 MP + 2 MP + 2 MP Triple Rear &amp; 16 MP Fr... \n",
"Realme 6i (6GB RAM + 64GB) 6.5 inches, 1080 x 2400 px, 90 Hz Display with... \n",
"Poco M4 Pro 5G 50 MP + 8 MP Dual Rear &amp; 16 MP Front Camera \n",
"Poco F4 5G 64 MP + 8 MP + 2 MP Triple Rear &amp; 20 MP Fr... \n",
"Nothing Phone 1 50 MP + 50 MP Dual Rear &amp; 16 MP Front Camera \n",
"Samsung Galaxy M34 5G 50 MP + 8 MP + 2 MP Triple Rear &amp; 13 MP Fr... \n",
"Realme Narzo 50 50 MP + 2 MP + 2 MP Triple Rear &amp; 16 MP Fr... \n",
"Motorola Moto G 5G 48 MP + 8 MP + 2 MP Triple Rear &amp; 16 MP Fr... \n",
"Xiaomi Redmi Note 12 5G 48 MP + 8 MP + 2 MP Triple Rear &amp; 13 MP Fr... \n",
"\n",
" External_Memory \\\n",
"Name \n",
"Vivo Y21T Memory Card Supported, upto 1 TB \n",
"Vivo Y66 Memory Card Supported, upto 128 GB \n",
"Vivo V23 Pro 5G Memory Card Not Supported \n",
"Realme 8i Memory Card Supported, upto 256 GB \n",
"Realme 9 5G Memory Card Supported, upto 1 TB \n",
"Realme 6i (6GB RAM + 64GB) 48 MP Quad Rear &amp; 16 MP Front Camera \n",
"Poco M4 Pro 5G Memory Card (Hybrid), upto 1 TB \n",
"Poco F4 5G Android v12 \n",
"Nothing Phone 1 Android v12 \n",
"Samsung Galaxy M34 5G Memory Card (Hybrid), upto 1 TB \n",
"Realme Narzo 50 Memory Card Supported, upto 256 GB \n",
"Motorola Moto G 5G Memory Card (Hybrid), upto 1 TB \n",
"Xiaomi Redmi Note 12 5G Memory Card (Hybrid), upto 1 TB \n",
"\n",
" Android_version Price company \\\n",
"Name \n",
"Vivo Y21T 11 NaN Vivo \n",
"Vivo Y66 6.0 (Marshmallow) NaN Vivo \n",
"Vivo V23 Pro 5G 12 NaN Vivo \n",
"Realme 8i 11 NaN Realme \n",
"Realme 9 5G 11 NaN Realme \n",
"Realme 6i (6GB RAM + 64GB) NaN NaN Realme \n",
"Poco M4 Pro 5G 11 NaN Poco \n",
"Poco F4 5G NaN NaN Poco \n",
"Nothing Phone 1 NaN NaN Nothing \n",
"Samsung Galaxy M34 5G 13 NaN Samsung \n",
"Realme Narzo 50 11 NaN Realme \n",
"Motorola Moto G 5G 10 NaN Motorola \n",
"Xiaomi Redmi Note 12 5G 12 NaN Xiaomi \n",
"\n",
" Inbuilt_memory fast_charging \\\n",
"Name \n",
"Vivo Y21T 128 GB inbuilt 18W Fast Charging \n",
"Vivo Y66 32 GB inbuilt NaN \n",
"Vivo V23 Pro 5G 128 GB inbuilt 44W Fast Charging \n",
"Realme 8i 64 GB inbuilt 18W Fast Charging \n",
"Realme 9 5G 64 GB inbuilt 18W Fast Charging \n",
"Realme 6i (6GB RAM + 64GB) Octa Core NaN \n",
"Poco M4 Pro 5G 64 GB inbuilt 33W Fast Charging \n",
"Poco F4 5G 128 GB inbuilt 67W Fast Charging \n",
"Nothing Phone 1 128 GB inbuilt 33W Fast Charging \n",
"Samsung Galaxy M34 5G 128 GB inbuilt 25W Fast Charging \n",
"Realme Narzo 50 64 GB inbuilt 33W Fast Charging \n",
"Motorola Moto G 5G 128 GB inbuilt 20W Fast Charging \n",
"Xiaomi Redmi Note 12 5G 128 GB inbuilt 33W Fast Charging \n",
"\n",
" Screen_resolution \\\n",
"Name \n",
"Vivo Y21T 1600 x 720 px \n",
"Vivo Y66 720 x 1280 px Display \n",
"Vivo V23 Pro 5G 1080 x 2376 px \n",
"Realme 8i 1080 x 2412 px \n",
"Realme 9 5G 1080 x 2400 px \n",
"Realme 6i (6GB RAM + 64GB) NaN \n",
"Poco M4 Pro 5G 1080 x 2400 px \n",
"Poco F4 5G 1080 x 2400 px \n",
"Nothing Phone 1 1080 x 2400 px \n",
"Samsung Galaxy M34 5G 1080 x 2340 px \n",
"Realme Narzo 50 1080 x 2412 px \n",
"Motorola Moto G 5G 1080 x 2400 px Display with Punch Hole \n",
"Xiaomi Redmi Note 12 5G 1080 x 2400 px \n",
"\n",
" Processor Processor_name \n",
"Name \n",
"Vivo Y21T Octa Core Snapdragon 680 \n",
"Vivo Y66 Octa Core Snapdragon MSM8937 \n",
"Vivo V23 Pro 5G Octa Core Dimensity 1200 \n",
"Realme 8i Octa Core Helio G96 \n",
"Realme 9 5G Octa Core Dimensity 810 5G \n",
"Realme 6i (6GB RAM + 64GB) NaN No Wifi \n",
"Poco M4 Pro 5G Octa Core Dimensity 810 5G \n",
"Poco F4 5G Octa Core Snapdragon 870 \n",
"Nothing Phone 1 Octa Core Snapdragon 778G Plus \n",
"Samsung Galaxy M34 5G Octa Core Exynos 1280 \n",
"Realme Narzo 50 Octa Core Helio G96 \n",
"Motorola Moto G 5G Octa Core Snapdragon 750G \n",
"Xiaomi Redmi Note 12 5G Octa Core Snapdragon 4 Gen 1 "
]
},
"execution_count": 35,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[df [\"Rating\"] < 4.00 ]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"группировка и агрегация данных в датафрейме"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [
{
"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>Rating</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Display</th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>10 inches</th>\n",
" <td>4.650000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12.1 inches</th>\n",
" <td>4.400000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4.5 inches</th>\n",
" <td>4.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4300 mAh Battery with 30W Fast Charging</th>\n",
" <td>3.850000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>48 MP + 5 MP + 2 MP Triple Rear &amp;amp; 8 MP Front Camera</th>\n",
" <td>4.550000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8 inches</th>\n",
" <td>4.266667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8.02 inches</th>\n",
" <td>4.325000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8.03 inches</th>\n",
" <td>4.308333</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8.2 inches</th>\n",
" <td>4.100000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8.3 inches</th>\n",
" <td>4.450000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>89 rows × 1 columns</p>\n",
"</div>"
],
"text/plain": [
" Rating\n",
"Display \n",
"10 inches 4.650000\n",
"12.1 inches 4.400000\n",
"4.5 inches 4.000000\n",
"4300 mAh Battery with 30W Fast Charging 3.850000\n",
"48 MP + 5 MP + 2 MP Triple Rear &amp; 8 MP Fron... 4.550000\n",
"... ...\n",
"8 inches 4.266667\n",
"8.02 inches 4.325000\n",
"8.03 inches 4.308333\n",
"8.2 inches 4.100000\n",
"8.3 inches 4.450000\n",
"\n",
"[89 rows x 1 columns]"
]
},
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"group = df.groupby([\"Display\"])[\"Rating\"].mean()\n",
"group.to_frame()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"сортировка данных в датафрейме"
]
},
{
"cell_type": "code",
"execution_count": 37,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" <th>Ram</th>\n",
" <th>Battery</th>\n",
" <th>Display</th>\n",
" <th>Camera</th>\n",
" <th>External_Memory</th>\n",
" <th>Android_version</th>\n",
" <th>Price</th>\n",
" <th>company</th>\n",
" <th>Inbuilt_memory</th>\n",
" <th>fast_charging</th>\n",
" <th>Screen_resolution</th>\n",
" <th>Processor</th>\n",
" <th>Processor_name</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Vivo Y66</th>\n",
" <td>125</td>\n",
" <td>3.75</td>\n",
" <td>53</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>3 GB RAM</td>\n",
" <td>3000 mAh Battery</td>\n",
" <td>5.5 inches</td>\n",
" <td>13 MP Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 128 GB</td>\n",
" <td>6.0 (Marshmallow)</td>\n",
" <td>NaN</td>\n",
" <td>Vivo</td>\n",
" <td>32 GB inbuilt</td>\n",
" <td>NaN</td>\n",
" <td>720 x 1280 px Display</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon MSM8937</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Realme 6i (6GB RAM + 64GB)</th>\n",
" <td>264</td>\n",
" <td>3.85</td>\n",
" <td>76</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>Helio G90T</td>\n",
" <td>6 GB RAM, 64 GB inbuilt</td>\n",
" <td>4300 mAh Battery with 30W Fast Charging</td>\n",
" <td>6.5 inches, 1080 x 2400 px, 90 Hz Display with...</td>\n",
" <td>48 MP Quad Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>Realme</td>\n",
" <td>Octa Core</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>No Wifi</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Motorola Moto G 5G</th>\n",
" <td>1002</td>\n",
" <td>3.90</td>\n",
" <td>82</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.67 inches</td>\n",
" <td>48 MP + 8 MP + 2 MP Triple Rear &amp;amp; 16 MP Fr...</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>10</td>\n",
" <td>NaN</td>\n",
" <td>Motorola</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>20W Fast Charging</td>\n",
" <td>1080 x 2400 px Display with Punch Hole</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 750G</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vivo V23 Pro 5G</th>\n",
" <td>146</td>\n",
" <td>3.90</td>\n",
" <td>85</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>4300 mAh Battery</td>\n",
" <td>6.56 inches</td>\n",
" <td>108 MP + 8 MP + 2 MP Triple Rear &amp;amp; 50 MP +...</td>\n",
" <td>Memory Card Not Supported</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Vivo</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>44W Fast Charging</td>\n",
" <td>1080 x 2376 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 1200</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Xiaomi Redmi Note 12 5G</th>\n",
" <td>1148</td>\n",
" <td>3.90</td>\n",
" <td>77</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.67 inches</td>\n",
" <td>48 MP + 8 MP + 2 MP Triple Rear &amp;amp; 13 MP Fr...</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Xiaomi</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 4 Gen 1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Vivo V30e (8GB RAM + 256GB)</th>\n",
" <td>145</td>\n",
" <td>4.75</td>\n",
" <td>86</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5500 mAh Battery</td>\n",
" <td>6.78 inches</td>\n",
" <td>50 MP + 8 MP Dual Rear &amp;amp; 50 MP Front Camera</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>14</td>\n",
" <td>NaN</td>\n",
" <td>Vivo</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>44W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 6 Gen1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Realme 11</th>\n",
" <td>901</td>\n",
" <td>4.75</td>\n",
" <td>83</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.72 inches</td>\n",
" <td>108 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>Realme</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>67W Fast Charging</td>\n",
" <td>1080 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6100 Plus</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A15 5G</th>\n",
" <td>24</td>\n",
" <td>4.75</td>\n",
" <td>81</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>50 MP + 5 MP + 2 MP Triple Rear &amp;amp; 13 MP Fr...</td>\n",
" <td>Memory Card (Hybrid), upto 1 TB</td>\n",
" <td>14</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>25W Fast Charging</td>\n",
" <td>1080 x 2340 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6100 Plus</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy F25 5G</th>\n",
" <td>27</td>\n",
" <td>4.75</td>\n",
" <td>76</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.67 inches</td>\n",
" <td>64 MP + 8 MP + 2 MP Triple Rear &amp;amp; 16 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>14</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>30W Fast Charging</td>\n",
" <td>1080 x 2408 px</td>\n",
" <td>NaN</td>\n",
" <td>Octa Core Processor</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A14 5G (6GB RAM + 128GB)</th>\n",
" <td>18</td>\n",
" <td>4.75</td>\n",
" <td>79</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 13 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>1080 x 2408 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Exynos 1330</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1370 rows × 17 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 Rating Spec_score \\\n",
"Name \n",
"Vivo Y66 125 3.75 53 \n",
"Realme 6i (6GB RAM + 64GB) 264 3.85 76 \n",
"Motorola Moto G 5G 1002 3.90 82 \n",
"Vivo V23 Pro 5G 146 3.90 85 \n",
"Xiaomi Redmi Note 12 5G 1148 3.90 77 \n",
"... ... ... ... \n",
"Vivo V30e (8GB RAM + 256GB) 145 4.75 86 \n",
"Realme 11 901 4.75 83 \n",
"Samsung Galaxy A15 5G 24 4.75 81 \n",
"Samsung Galaxy F25 5G 27 4.75 76 \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 18 4.75 79 \n",
"\n",
" No_of_sim \\\n",
"Name \n",
"Vivo Y66 Dual Sim, 3G, 4G, VoLTE, \n",
"Realme 6i (6GB RAM + 64GB) Dual Sim, 3G, 4G, VoLTE, \n",
"Motorola Moto G 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Vivo V23 Pro 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Xiaomi Redmi Note 12 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"... ... \n",
"Vivo V30e (8GB RAM + 256GB) Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Realme 11 Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Samsung Galaxy A15 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Samsung Galaxy F25 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"\n",
" Ram Battery \\\n",
"Name \n",
"Vivo Y66 3 GB RAM 3000 mAh Battery \n",
"Realme 6i (6GB RAM + 64GB) Helio G90T 6 GB RAM, 64 GB inbuilt \n",
"Motorola Moto G 5G 6 GB RAM 5000 mAh Battery \n",
"Vivo V23 Pro 5G 8 GB RAM 4300 mAh Battery \n",
"Xiaomi Redmi Note 12 5G 4 GB RAM 5000 mAh Battery \n",
"... ... ... \n",
"Vivo V30e (8GB RAM + 256GB) 8 GB RAM 5500 mAh Battery \n",
"Realme 11 8 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy A15 5G 8 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy F25 5G 8 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 6 GB RAM 5000 mAh Battery \n",
"\n",
" Display \\\n",
"Name \n",
"Vivo Y66 5.5 inches \n",
"Realme 6i (6GB RAM + 64GB) 4300 mAh Battery with 30W Fast Charging \n",
"Motorola Moto G 5G 6.67 inches \n",
"Vivo V23 Pro 5G 6.56 inches \n",
"Xiaomi Redmi Note 12 5G 6.67 inches \n",
"... ... \n",
"Vivo V30e (8GB RAM + 256GB) 6.78 inches \n",
"Realme 11 6.72 inches \n",
"Samsung Galaxy A15 5G 6.5 inches \n",
"Samsung Galaxy F25 5G 6.67 inches \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 6.6 inches \n",
"\n",
" Camera \\\n",
"Name \n",
"Vivo Y66 13 MP Rear &amp; 16 MP Front Camera \n",
"Realme 6i (6GB RAM + 64GB) 6.5 inches, 1080 x 2400 px, 90 Hz Display with... \n",
"Motorola Moto G 5G 48 MP + 8 MP + 2 MP Triple Rear &amp; 16 MP Fr... \n",
"Vivo V23 Pro 5G 108 MP + 8 MP + 2 MP Triple Rear &amp; 50 MP +... \n",
"Xiaomi Redmi Note 12 5G 48 MP + 8 MP + 2 MP Triple Rear &amp; 13 MP Fr... \n",
"... ... \n",
"Vivo V30e (8GB RAM + 256GB) 50 MP + 8 MP Dual Rear &amp; 50 MP Front Camera \n",
"Realme 11 108 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"Samsung Galaxy A15 5G 50 MP + 5 MP + 2 MP Triple Rear &amp; 13 MP Fr... \n",
"Samsung Galaxy F25 5G 64 MP + 8 MP + 2 MP Triple Rear &amp; 16 MP Fr... \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 50 MP + 2 MP + 2 MP Triple Rear &amp; 13 MP Fr... \n",
"\n",
" External_Memory \\\n",
"Name \n",
"Vivo Y66 Memory Card Supported, upto 128 GB \n",
"Realme 6i (6GB RAM + 64GB) 48 MP Quad Rear &amp; 16 MP Front Camera \n",
"Motorola Moto G 5G Memory Card (Hybrid), upto 1 TB \n",
"Vivo V23 Pro 5G Memory Card Not Supported \n",
"Xiaomi Redmi Note 12 5G Memory Card (Hybrid), upto 1 TB \n",
"... ... \n",
"Vivo V30e (8GB RAM + 256GB) Memory Card (Hybrid) \n",
"Realme 11 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A15 5G Memory Card (Hybrid), upto 1 TB \n",
"Samsung Galaxy F25 5G Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) Memory Card Supported, upto 1 TB \n",
"\n",
" Android_version Price company \\\n",
"Name \n",
"Vivo Y66 6.0 (Marshmallow) NaN Vivo \n",
"Realme 6i (6GB RAM + 64GB) NaN NaN Realme \n",
"Motorola Moto G 5G 10 NaN Motorola \n",
"Vivo V23 Pro 5G 12 NaN Vivo \n",
"Xiaomi Redmi Note 12 5G 12 NaN Xiaomi \n",
"... ... ... ... \n",
"Vivo V30e (8GB RAM + 256GB) 14 NaN Vivo \n",
"Realme 11 13 NaN Realme \n",
"Samsung Galaxy A15 5G 14 NaN Samsung \n",
"Samsung Galaxy F25 5G 14 NaN Samsung \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 13 NaN Samsung \n",
"\n",
" Inbuilt_memory fast_charging \\\n",
"Name \n",
"Vivo Y66 32 GB inbuilt NaN \n",
"Realme 6i (6GB RAM + 64GB) Octa Core NaN \n",
"Motorola Moto G 5G 128 GB inbuilt 20W Fast Charging \n",
"Vivo V23 Pro 5G 128 GB inbuilt 44W Fast Charging \n",
"Xiaomi Redmi Note 12 5G 128 GB inbuilt 33W Fast Charging \n",
"... ... ... \n",
"Vivo V30e (8GB RAM + 256GB) 256 GB inbuilt 44W Fast Charging \n",
"Realme 11 128 GB inbuilt 67W Fast Charging \n",
"Samsung Galaxy A15 5G 128 GB inbuilt 25W Fast Charging \n",
"Samsung Galaxy F25 5G 128 GB inbuilt 30W Fast Charging \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 128 GB inbuilt 15W Fast Charging \n",
"\n",
" Screen_resolution \\\n",
"Name \n",
"Vivo Y66 720 x 1280 px Display \n",
"Realme 6i (6GB RAM + 64GB) NaN \n",
"Motorola Moto G 5G 1080 x 2400 px Display with Punch Hole \n",
"Vivo V23 Pro 5G 1080 x 2376 px \n",
"Xiaomi Redmi Note 12 5G 1080 x 2400 px \n",
"... ... \n",
"Vivo V30e (8GB RAM + 256GB) 1080 x 2400 px \n",
"Realme 11 1080 x 2400 px \n",
"Samsung Galaxy A15 5G 1080 x 2340 px \n",
"Samsung Galaxy F25 5G 1080 x 2408 px \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) 1080 x 2408 px \n",
"\n",
" Processor Processor_name \n",
"Name \n",
"Vivo Y66 Octa Core Snapdragon MSM8937 \n",
"Realme 6i (6GB RAM + 64GB) NaN No Wifi \n",
"Motorola Moto G 5G Octa Core Snapdragon 750G \n",
"Vivo V23 Pro 5G Octa Core Dimensity 1200 \n",
"Xiaomi Redmi Note 12 5G Octa Core Snapdragon 4 Gen 1 \n",
"... ... ... \n",
"Vivo V30e (8GB RAM + 256GB) Octa Core Snapdragon 6 Gen1 \n",
"Realme 11 Octa Core Dimensity 6100 Plus \n",
"Samsung Galaxy A15 5G Octa Core Dimensity 6100 Plus \n",
"Samsung Galaxy F25 5G NaN Octa Core Processor \n",
"Samsung Galaxy A14 5G (6GB RAM + 128GB) Octa Core Exynos 1330 \n",
"\n",
"[1370 rows x 17 columns]"
]
},
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sorted_df = df.sort_values(by=\"Rating\", ascending=True)\n",
"sorted_df "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"удаление строк/столбцов"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" <th>Ram</th>\n",
" <th>Battery</th>\n",
" <th>Display</th>\n",
" <th>Camera</th>\n",
" <th>External_Memory</th>\n",
" <th>Price</th>\n",
" <th>Inbuilt_memory</th>\n",
" <th>fast_charging</th>\n",
" <th>Screen_resolution</th>\n",
" <th>Processor</th>\n",
" <th>Processor_name</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Samsung Galaxy F14 5G</th>\n",
" <td>0</td>\n",
" <td>4.65</td>\n",
" <td>68</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 13 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>NaN</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>25W Fast Charging</td>\n",
" <td>2408 x 1080 px Display with Water Drop Notch</td>\n",
" <td>Octa Core Processor</td>\n",
" <td>Exynos 1330</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A11</th>\n",
" <td>1</td>\n",
" <td>4.20</td>\n",
" <td>63</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>2 GB RAM</td>\n",
" <td>4000 mAh Battery</td>\n",
" <td>6.4 inches</td>\n",
" <td>13 MP + 5 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 512 GB</td>\n",
" <td>NaN</td>\n",
" <td>32 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1560 px Display with Punch Hole</td>\n",
" <td>1.8 GHz Processor</td>\n",
" <td>Octa Core</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A13</th>\n",
" <td>2</td>\n",
" <td>4.30</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP Quad Rear &amp;amp; 8 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>NaN</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>25W Fast Charging</td>\n",
" <td>1080 x 2408 px Display with Water Drop Notch</td>\n",
" <td>2 GHz Processor</td>\n",
" <td>Octa Core</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy F23</th>\n",
" <td>3</td>\n",
" <td>4.10</td>\n",
" <td>73</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.4 inches</td>\n",
" <td>48 MP Quad Rear &amp;amp; 13 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>NaN</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>NaN</td>\n",
" <td>720 x 1600 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio G88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A03s (4GB RAM + 64GB)</th>\n",
" <td>4</td>\n",
" <td>4.10</td>\n",
" <td>69</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>13 MP + 2 MP + 2 MP Triple Rear &amp;amp; 5 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>NaN</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1600 px Display with Water Drop Notch</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio P35</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40R</th>\n",
" <td>1365</td>\n",
" <td>4.05</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>NaN</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 700 5G</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XL NxtPaper 5G</th>\n",
" <td>1366</td>\n",
" <td>4.10</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.8 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>NaN</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1200 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 7050</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XE NxtPaper 5G</th>\n",
" <td>1367</td>\n",
" <td>4.00</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>NaN</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>18W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6080</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40 NxtPaper 5G</th>\n",
" <td>1368</td>\n",
" <td>4.50</td>\n",
" <td>79</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>NaN</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL Trifold</th>\n",
" <td>1369</td>\n",
" <td>4.65</td>\n",
" <td>93</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G,</td>\n",
" <td>12 GB RAM</td>\n",
" <td>4600 mAh Battery</td>\n",
" <td>10 inches</td>\n",
" <td>Foldable Display, Dual Display</td>\n",
" <td>50 MP + 48 MP + 8 MP Triple Rear &amp;amp; 32 MP F...</td>\n",
" <td>NaN</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>67W Fast Charging</td>\n",
" <td>1916 x 2160 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 8 Gen2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1370 rows × 15 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 Rating Spec_score \\\n",
"Name \n",
"Samsung Galaxy F14 5G 0 4.65 68 \n",
"Samsung Galaxy A11 1 4.20 63 \n",
"Samsung Galaxy A13 2 4.30 75 \n",
"Samsung Galaxy F23 3 4.10 73 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4 4.10 69 \n",
"... ... ... ... \n",
"TCL 40R 1365 4.05 75 \n",
"TCL 50 XL NxtPaper 5G 1366 4.10 80 \n",
"TCL 50 XE NxtPaper 5G 1367 4.00 80 \n",
"TCL 40 NxtPaper 5G 1368 4.50 79 \n",
"TCL Trifold 1369 4.65 93 \n",
"\n",
" No_of_sim \\\n",
"Name \n",
"Samsung Galaxy F14 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Samsung Galaxy A11 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy A13 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy F23 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Dual Sim, 3G, 4G, VoLTE, \n",
"... ... \n",
"TCL 40R Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL 50 XL NxtPaper 5G Dual Sim, 3G, 4G, VoLTE, \n",
"TCL 50 XE NxtPaper 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL 40 NxtPaper 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL Trifold Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G, \n",
"\n",
" Ram Battery \\\n",
"Name \n",
"Samsung Galaxy F14 5G 4 GB RAM 6000 mAh Battery \n",
"Samsung Galaxy A11 2 GB RAM 4000 mAh Battery \n",
"Samsung Galaxy A13 4 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy F23 4 GB RAM 6000 mAh Battery \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4 GB RAM 5000 mAh Battery \n",
"... ... ... \n",
"TCL 40R 4 GB RAM 5000 mAh Battery \n",
"TCL 50 XL NxtPaper 5G 8 GB RAM 5000 mAh Battery \n",
"TCL 50 XE NxtPaper 5G 6 GB RAM 5000 mAh Battery \n",
"TCL 40 NxtPaper 5G 6 GB RAM 5000 mAh Battery \n",
"TCL Trifold 12 GB RAM 4600 mAh Battery \n",
"\n",
" Display \\\n",
"Name \n",
"Samsung Galaxy F14 5G 6.6 inches \n",
"Samsung Galaxy A11 6.4 inches \n",
"Samsung Galaxy A13 6.6 inches \n",
"Samsung Galaxy F23 6.4 inches \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 6.5 inches \n",
"... ... \n",
"TCL 40R 6.6 inches \n",
"TCL 50 XL NxtPaper 5G 6.8 inches \n",
"TCL 50 XE NxtPaper 5G 6.6 inches \n",
"TCL 40 NxtPaper 5G 6.6 inches \n",
"TCL Trifold 10 inches \n",
"\n",
" Camera \\\n",
"Name \n",
"Samsung Galaxy F14 5G 50 MP + 2 MP Dual Rear &amp; 13 MP Front Camera \n",
"Samsung Galaxy A11 13 MP + 5 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"Samsung Galaxy A13 50 MP Quad Rear &amp; 8 MP Front Camera \n",
"Samsung Galaxy F23 48 MP Quad Rear &amp; 13 MP Front Camera \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 13 MP + 2 MP + 2 MP Triple Rear &amp; 5 MP Fro... \n",
"... ... \n",
"TCL 40R 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"TCL 50 XL NxtPaper 5G 50 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"TCL 50 XE NxtPaper 5G 50 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"TCL 40 NxtPaper 5G 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"TCL Trifold Foldable Display, Dual Display \n",
"\n",
" External_Memory \\\n",
"Name \n",
"Samsung Galaxy F14 5G Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A11 Memory Card Supported, upto 512 GB \n",
"Samsung Galaxy A13 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy F23 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Memory Card Supported, upto 1 TB \n",
"... ... \n",
"TCL 40R Memory Card (Hybrid) \n",
"TCL 50 XL NxtPaper 5G Memory Card (Hybrid) \n",
"TCL 50 XE NxtPaper 5G Memory Card Supported, upto 1 TB \n",
"TCL 40 NxtPaper 5G Memory Card Supported, upto 1 TB \n",
"TCL Trifold 50 MP + 48 MP + 8 MP Triple Rear &amp; 32 MP F... \n",
"\n",
" Price Inbuilt_memory \\\n",
"Name \n",
"Samsung Galaxy F14 5G NaN 128 GB inbuilt \n",
"Samsung Galaxy A11 NaN 32 GB inbuilt \n",
"Samsung Galaxy A13 NaN 64 GB inbuilt \n",
"Samsung Galaxy F23 NaN 64 GB inbuilt \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) NaN 64 GB inbuilt \n",
"... ... ... \n",
"TCL 40R NaN 64 GB inbuilt \n",
"TCL 50 XL NxtPaper 5G NaN 128 GB inbuilt \n",
"TCL 50 XE NxtPaper 5G NaN 256 GB inbuilt \n",
"TCL 40 NxtPaper 5G NaN 256 GB inbuilt \n",
"TCL Trifold NaN 256 GB inbuilt \n",
"\n",
" fast_charging \\\n",
"Name \n",
"Samsung Galaxy F14 5G 25W Fast Charging \n",
"Samsung Galaxy A11 15W Fast Charging \n",
"Samsung Galaxy A13 25W Fast Charging \n",
"Samsung Galaxy F23 NaN \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 15W Fast Charging \n",
"... ... \n",
"TCL 40R 15W Fast Charging \n",
"TCL 50 XL NxtPaper 5G 33W Fast Charging \n",
"TCL 50 XE NxtPaper 5G 18W Fast Charging \n",
"TCL 40 NxtPaper 5G 15W Fast Charging \n",
"TCL Trifold 67W Fast Charging \n",
"\n",
" Screen_resolution \\\n",
"Name \n",
"Samsung Galaxy F14 5G 2408 x 1080 px Display with Water Drop Notch \n",
"Samsung Galaxy A11 720 x 1560 px Display with Punch Hole \n",
"Samsung Galaxy A13 1080 x 2408 px Display with Water Drop Notch \n",
"Samsung Galaxy F23 720 x 1600 px \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 720 x 1600 px Display with Water Drop Notch \n",
"... ... \n",
"TCL 40R 720 x 1612 px \n",
"TCL 50 XL NxtPaper 5G 1200 x 2400 px \n",
"TCL 50 XE NxtPaper 5G 720 x 1612 px \n",
"TCL 40 NxtPaper 5G 720 x 1612 px \n",
"TCL Trifold 1916 x 2160 px \n",
"\n",
" Processor Processor_name \n",
"Name \n",
"Samsung Galaxy F14 5G Octa Core Processor Exynos 1330 \n",
"Samsung Galaxy A11 1.8 GHz Processor Octa Core \n",
"Samsung Galaxy A13 2 GHz Processor Octa Core \n",
"Samsung Galaxy F23 Octa Core Helio G88 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Octa Core Helio P35 \n",
"... ... ... \n",
"TCL 40R Octa Core Dimensity 700 5G \n",
"TCL 50 XL NxtPaper 5G Octa Core Dimensity 7050 \n",
"TCL 50 XE NxtPaper 5G Octa Core Dimensity 6080 \n",
"TCL 40 NxtPaper 5G Octa Core Dimensity 6020 \n",
"TCL Trifold Octa Core Snapdragon 8 Gen2 \n",
"\n",
"[1370 rows x 15 columns]"
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_dropped_columns = df.drop(columns=[\"Android_version\", \"company\"])\n",
"df_dropped_columns"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" <th>Ram</th>\n",
" <th>Battery</th>\n",
" <th>Display</th>\n",
" <th>Camera</th>\n",
" <th>External_Memory</th>\n",
" <th>Android_version</th>\n",
" <th>Price</th>\n",
" <th>company</th>\n",
" <th>Inbuilt_memory</th>\n",
" <th>fast_charging</th>\n",
" <th>Screen_resolution</th>\n",
" <th>Processor</th>\n",
" <th>Processor_name</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2</td>\n",
" <td>4.30</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP Quad Rear &amp;amp; 8 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>25W Fast Charging</td>\n",
" <td>1080 x 2408 px Display with Water Drop Notch</td>\n",
" <td>2 GHz Processor</td>\n",
" <td>Octa Core</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>3</td>\n",
" <td>4.10</td>\n",
" <td>73</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.4 inches</td>\n",
" <td>48 MP Quad Rear &amp;amp; 13 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>NaN</td>\n",
" <td>720 x 1600 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio G88</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>4</td>\n",
" <td>4.10</td>\n",
" <td>69</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>13 MP + 2 MP + 2 MP Triple Rear &amp;amp; 5 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1600 px Display with Water Drop Notch</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio P35</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>5</td>\n",
" <td>4.40</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 5 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1600 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 700</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>6</td>\n",
" <td>4.10</td>\n",
" <td>76</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.4 inches</td>\n",
" <td>48 MP + 8 MP + 5 MP Triple Rear &amp;amp; 20 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 512 GB</td>\n",
" <td>11</td>\n",
" <td>NaN</td>\n",
" <td>Samsung</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>1080 x 2340 px Display with Water Drop Notch</td>\n",
" <td>Octa Core</td>\n",
" <td>Exynos 9611</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1363</th>\n",
" <td>1365</td>\n",
" <td>4.05</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>12</td>\n",
" <td>NaN</td>\n",
" <td>TCL</td>\n",
" <td>64 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 700 5G</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1364</th>\n",
" <td>1366</td>\n",
" <td>4.10</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.8 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>14</td>\n",
" <td>NaN</td>\n",
" <td>TCL</td>\n",
" <td>128 GB inbuilt</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1200 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 7050</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1365</th>\n",
" <td>1367</td>\n",
" <td>4.00</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>TCL</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>18W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6080</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1366</th>\n",
" <td>1368</td>\n",
" <td>4.50</td>\n",
" <td>79</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>TCL</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6020</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1367</th>\n",
" <td>1369</td>\n",
" <td>4.65</td>\n",
" <td>93</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G,</td>\n",
" <td>12 GB RAM</td>\n",
" <td>4600 mAh Battery</td>\n",
" <td>10 inches</td>\n",
" <td>Foldable Display, Dual Display</td>\n",
" <td>50 MP + 48 MP + 8 MP Triple Rear &amp;amp; 32 MP F...</td>\n",
" <td>13</td>\n",
" <td>NaN</td>\n",
" <td>TCL</td>\n",
" <td>256 GB inbuilt</td>\n",
" <td>67W Fast Charging</td>\n",
" <td>1916 x 2160 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 8 Gen2</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1368 rows × 17 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 Rating Spec_score No_of_sim \\\n",
"0 2 4.30 75 Dual Sim, 3G, 4G, VoLTE, \n",
"1 3 4.10 73 Dual Sim, 3G, 4G, VoLTE, \n",
"2 4 4.10 69 Dual Sim, 3G, 4G, VoLTE, \n",
"3 5 4.40 75 Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"4 6 4.10 76 Dual Sim, 3G, 4G, VoLTE, \n",
"... ... ... ... ... \n",
"1363 1365 4.05 75 Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"1364 1366 4.10 80 Dual Sim, 3G, 4G, VoLTE, \n",
"1365 1367 4.00 80 Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"1366 1368 4.50 79 Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"1367 1369 4.65 93 Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G, \n",
"\n",
" Ram Battery Display \\\n",
"0 4 GB RAM 5000 mAh Battery 6.6 inches \n",
"1 4 GB RAM 6000 mAh Battery 6.4 inches \n",
"2 4 GB RAM 5000 mAh Battery 6.5 inches \n",
"3 6 GB RAM 5000 mAh Battery 6.5 inches \n",
"4 4 GB RAM 6000 mAh Battery 6.4 inches \n",
"... ... ... ... \n",
"1363 4 GB RAM 5000 mAh Battery 6.6 inches \n",
"1364 8 GB RAM 5000 mAh Battery 6.8 inches \n",
"1365 6 GB RAM 5000 mAh Battery 6.6 inches \n",
"1366 6 GB RAM 5000 mAh Battery 6.6 inches \n",
"1367 12 GB RAM 4600 mAh Battery 10 inches \n",
"\n",
" Camera \\\n",
"0 50 MP Quad Rear &amp; 8 MP Front Camera \n",
"1 48 MP Quad Rear &amp; 13 MP Front Camera \n",
"2 13 MP + 2 MP + 2 MP Triple Rear &amp; 5 MP Fro... \n",
"3 50 MP + 2 MP Dual Rear &amp; 5 MP Front Camera \n",
"4 48 MP + 8 MP + 5 MP Triple Rear &amp; 20 MP Fr... \n",
"... ... \n",
"1363 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"1364 50 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"1365 50 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"1366 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"1367 Foldable Display, Dual Display \n",
"\n",
" External_Memory Android_version \\\n",
"0 Memory Card Supported, upto 1 TB 12 \n",
"1 Memory Card Supported, upto 1 TB 12 \n",
"2 Memory Card Supported, upto 1 TB 11 \n",
"3 Memory Card Supported, upto 1 TB 12 \n",
"4 Memory Card Supported, upto 512 GB 11 \n",
"... ... ... \n",
"1363 Memory Card (Hybrid) 12 \n",
"1364 Memory Card (Hybrid) 14 \n",
"1365 Memory Card Supported, upto 1 TB 13 \n",
"1366 Memory Card Supported, upto 1 TB 13 \n",
"1367 50 MP + 48 MP + 8 MP Triple Rear &amp; 32 MP F... 13 \n",
"\n",
" Price company Inbuilt_memory fast_charging \\\n",
"0 NaN Samsung 64 GB inbuilt 25W Fast Charging \n",
"1 NaN Samsung 64 GB inbuilt NaN \n",
"2 NaN Samsung 64 GB inbuilt 15W Fast Charging \n",
"3 NaN Samsung 128 GB inbuilt 15W Fast Charging \n",
"4 NaN Samsung 64 GB inbuilt 15W Fast Charging \n",
"... ... ... ... ... \n",
"1363 NaN TCL 64 GB inbuilt 15W Fast Charging \n",
"1364 NaN TCL 128 GB inbuilt 33W Fast Charging \n",
"1365 NaN TCL 256 GB inbuilt 18W Fast Charging \n",
"1366 NaN TCL 256 GB inbuilt 15W Fast Charging \n",
"1367 NaN TCL 256 GB inbuilt 67W Fast Charging \n",
"\n",
" Screen_resolution Processor \\\n",
"0 1080 x 2408 px Display with Water Drop Notch 2 GHz Processor \n",
"1 720 x 1600 px Octa Core \n",
"2 720 x 1600 px Display with Water Drop Notch Octa Core \n",
"3 720 x 1600 px Octa Core \n",
"4 1080 x 2340 px Display with Water Drop Notch Octa Core \n",
"... ... ... \n",
"1363 720 x 1612 px Octa Core \n",
"1364 1200 x 2400 px Octa Core \n",
"1365 720 x 1612 px Octa Core \n",
"1366 720 x 1612 px Octa Core \n",
"1367 1916 x 2160 px Octa Core \n",
"\n",
" Processor_name \n",
"0 Octa Core \n",
"1 Helio G88 \n",
"2 Helio P35 \n",
"3 Dimensity 700 \n",
"4 Exynos 9611 \n",
"... ... \n",
"1363 Dimensity 700 5G \n",
"1364 Dimensity 7050 \n",
"1365 Dimensity 6080 \n",
"1366 Dimensity 6020 \n",
"1367 Snapdragon 8 Gen2 \n",
"\n",
"[1368 rows x 17 columns]"
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_dropped_rows = df.drop(df.index[[0, 1]], inplace=True)\n",
"df_dropped_rows = df.reset_index(drop=True)\n",
"df_dropped_rows"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"создание новых столбцов на основе данных из существующих столбцов"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" <th>Ram</th>\n",
" <th>Battery</th>\n",
" <th>Display</th>\n",
" <th>Camera</th>\n",
" <th>External_Memory</th>\n",
" <th>Android_version</th>\n",
" <th>...</th>\n",
" <th>fast_charging</th>\n",
" <th>Screen_resolution</th>\n",
" <th>Processor</th>\n",
" <th>Processor_name</th>\n",
" <th>Price_per_GB_RAM</th>\n",
" <th>Price_Rating</th>\n",
" <th>Ram_GB</th>\n",
" <th>Battery_mAh</th>\n",
" <th>Screen_Type</th>\n",
" <th>Total_Storage_GB</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Samsung Galaxy A13</th>\n",
" <td>2</td>\n",
" <td>4.30</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP Quad Rear &amp;amp; 8 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>...</td>\n",
" <td>25W Fast Charging</td>\n",
" <td>1080 x 2408 px Display with Water Drop Notch</td>\n",
" <td>2 GHz Processor</td>\n",
" <td>Octa Core</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>5000</td>\n",
" <td>2408</td>\n",
" <td>64 GB inbuiltMemory Card Supported, upto 1 TB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy F23</th>\n",
" <td>3</td>\n",
" <td>4.10</td>\n",
" <td>73</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.4 inches</td>\n",
" <td>48 MP Quad Rear &amp;amp; 13 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>...</td>\n",
" <td>NaN</td>\n",
" <td>720 x 1600 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio G88</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>6000</td>\n",
" <td>1600</td>\n",
" <td>64 GB inbuiltMemory Card Supported, upto 1 TB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy A03s (4GB RAM + 64GB)</th>\n",
" <td>4</td>\n",
" <td>4.10</td>\n",
" <td>69</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>13 MP + 2 MP + 2 MP Triple Rear &amp;amp; 5 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>11</td>\n",
" <td>...</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1600 px Display with Water Drop Notch</td>\n",
" <td>Octa Core</td>\n",
" <td>Helio P35</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>5000</td>\n",
" <td>1600</td>\n",
" <td>64 GB inbuiltMemory Card Supported, upto 1 TB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy M13 5G</th>\n",
" <td>5</td>\n",
" <td>4.40</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.5 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 5 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>12</td>\n",
" <td>...</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1600 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 700</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>6</td>\n",
" <td>5000</td>\n",
" <td>1600</td>\n",
" <td>128 GB inbuiltMemory Card Supported, upto 1 TB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Samsung Galaxy M21 2021</th>\n",
" <td>6</td>\n",
" <td>4.10</td>\n",
" <td>76</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>6000 mAh Battery</td>\n",
" <td>6.4 inches</td>\n",
" <td>48 MP + 8 MP + 5 MP Triple Rear &amp;amp; 20 MP Fr...</td>\n",
" <td>Memory Card Supported, upto 512 GB</td>\n",
" <td>11</td>\n",
" <td>...</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>1080 x 2340 px Display with Water Drop Notch</td>\n",
" <td>Octa Core</td>\n",
" <td>Exynos 9611</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>6000</td>\n",
" <td>2340</td>\n",
" <td>64 GB inbuiltMemory Card Supported, upto 512 GB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40R</th>\n",
" <td>1365</td>\n",
" <td>4.05</td>\n",
" <td>75</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>4 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>12</td>\n",
" <td>...</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 700 5G</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>4</td>\n",
" <td>5000</td>\n",
" <td>1612</td>\n",
" <td>64 GB inbuiltMemory Card (Hybrid)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XL NxtPaper 5G</th>\n",
" <td>1366</td>\n",
" <td>4.10</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, VoLTE,</td>\n",
" <td>8 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.8 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card (Hybrid)</td>\n",
" <td>14</td>\n",
" <td>...</td>\n",
" <td>33W Fast Charging</td>\n",
" <td>1200 x 2400 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 7050</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>8</td>\n",
" <td>5000</td>\n",
" <td>2400</td>\n",
" <td>128 GB inbuiltMemory Card (Hybrid)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 50 XE NxtPaper 5G</th>\n",
" <td>1367</td>\n",
" <td>4.00</td>\n",
" <td>80</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP Dual Rear &amp;amp; 16 MP Front Camera</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>...</td>\n",
" <td>18W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6080</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>6</td>\n",
" <td>5000</td>\n",
" <td>1612</td>\n",
" <td>256 GB inbuiltMemory Card Supported, upto 1 TB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL 40 NxtPaper 5G</th>\n",
" <td>1368</td>\n",
" <td>4.50</td>\n",
" <td>79</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE,</td>\n",
" <td>6 GB RAM</td>\n",
" <td>5000 mAh Battery</td>\n",
" <td>6.6 inches</td>\n",
" <td>50 MP + 2 MP + 2 MP Triple Rear &amp;amp; 8 MP Fro...</td>\n",
" <td>Memory Card Supported, upto 1 TB</td>\n",
" <td>13</td>\n",
" <td>...</td>\n",
" <td>15W Fast Charging</td>\n",
" <td>720 x 1612 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Dimensity 6020</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>6</td>\n",
" <td>5000</td>\n",
" <td>1612</td>\n",
" <td>256 GB inbuiltMemory Card Supported, upto 1 TB</td>\n",
" </tr>\n",
" <tr>\n",
" <th>TCL Trifold</th>\n",
" <td>1369</td>\n",
" <td>4.65</td>\n",
" <td>93</td>\n",
" <td>Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G,</td>\n",
" <td>12 GB RAM</td>\n",
" <td>4600 mAh Battery</td>\n",
" <td>10 inches</td>\n",
" <td>Foldable Display, Dual Display</td>\n",
" <td>50 MP + 48 MP + 8 MP Triple Rear &amp;amp; 32 MP F...</td>\n",
" <td>13</td>\n",
" <td>...</td>\n",
" <td>67W Fast Charging</td>\n",
" <td>1916 x 2160 px</td>\n",
" <td>Octa Core</td>\n",
" <td>Snapdragon 8 Gen2</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>12</td>\n",
" <td>4600</td>\n",
" <td>2160</td>\n",
" <td>256 GB inbuilt50 MP + 48 MP + 8 MP Triple Rea...</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1368 rows × 23 columns</p>\n",
"</div>"
],
"text/plain": [
" Unnamed: 0 Rating Spec_score \\\n",
"Name \n",
"Samsung Galaxy A13 2 4.30 75 \n",
"Samsung Galaxy F23 3 4.10 73 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4 4.10 69 \n",
"Samsung Galaxy M13 5G 5 4.40 75 \n",
"Samsung Galaxy M21 2021 6 4.10 76 \n",
"... ... ... ... \n",
"TCL 40R 1365 4.05 75 \n",
"TCL 50 XL NxtPaper 5G 1366 4.10 80 \n",
"TCL 50 XE NxtPaper 5G 1367 4.00 80 \n",
"TCL 40 NxtPaper 5G 1368 4.50 79 \n",
"TCL Trifold 1369 4.65 93 \n",
"\n",
" No_of_sim \\\n",
"Name \n",
"Samsung Galaxy A13 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy F23 Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Dual Sim, 3G, 4G, VoLTE, \n",
"Samsung Galaxy M13 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"Samsung Galaxy M21 2021 Dual Sim, 3G, 4G, VoLTE, \n",
"... ... \n",
"TCL 40R Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL 50 XL NxtPaper 5G Dual Sim, 3G, 4G, VoLTE, \n",
"TCL 50 XE NxtPaper 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL 40 NxtPaper 5G Dual Sim, 3G, 4G, 5G, VoLTE, \n",
"TCL Trifold Dual Sim, 3G, 4G, 5G, VoLTE, Vo5G, \n",
"\n",
" Ram Battery \\\n",
"Name \n",
"Samsung Galaxy A13 4 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy F23 4 GB RAM 6000 mAh Battery \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 4 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy M13 5G 6 GB RAM 5000 mAh Battery \n",
"Samsung Galaxy M21 2021 4 GB RAM 6000 mAh Battery \n",
"... ... ... \n",
"TCL 40R 4 GB RAM 5000 mAh Battery \n",
"TCL 50 XL NxtPaper 5G 8 GB RAM 5000 mAh Battery \n",
"TCL 50 XE NxtPaper 5G 6 GB RAM 5000 mAh Battery \n",
"TCL 40 NxtPaper 5G 6 GB RAM 5000 mAh Battery \n",
"TCL Trifold 12 GB RAM 4600 mAh Battery \n",
"\n",
" Display \\\n",
"Name \n",
"Samsung Galaxy A13 6.6 inches \n",
"Samsung Galaxy F23 6.4 inches \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 6.5 inches \n",
"Samsung Galaxy M13 5G 6.5 inches \n",
"Samsung Galaxy M21 2021 6.4 inches \n",
"... ... \n",
"TCL 40R 6.6 inches \n",
"TCL 50 XL NxtPaper 5G 6.8 inches \n",
"TCL 50 XE NxtPaper 5G 6.6 inches \n",
"TCL 40 NxtPaper 5G 6.6 inches \n",
"TCL Trifold 10 inches \n",
"\n",
" Camera \\\n",
"Name \n",
"Samsung Galaxy A13 50 MP Quad Rear &amp; 8 MP Front Camera \n",
"Samsung Galaxy F23 48 MP Quad Rear &amp; 13 MP Front Camera \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 13 MP + 2 MP + 2 MP Triple Rear &amp; 5 MP Fro... \n",
"Samsung Galaxy M13 5G 50 MP + 2 MP Dual Rear &amp; 5 MP Front Camera \n",
"Samsung Galaxy M21 2021 48 MP + 8 MP + 5 MP Triple Rear &amp; 20 MP Fr... \n",
"... ... \n",
"TCL 40R 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"TCL 50 XL NxtPaper 5G 50 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"TCL 50 XE NxtPaper 5G 50 MP + 2 MP Dual Rear &amp; 16 MP Front Camera \n",
"TCL 40 NxtPaper 5G 50 MP + 2 MP + 2 MP Triple Rear &amp; 8 MP Fro... \n",
"TCL Trifold Foldable Display, Dual Display \n",
"\n",
" External_Memory \\\n",
"Name \n",
"Samsung Galaxy A13 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy F23 Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy M13 5G Memory Card Supported, upto 1 TB \n",
"Samsung Galaxy M21 2021 Memory Card Supported, upto 512 GB \n",
"... ... \n",
"TCL 40R Memory Card (Hybrid) \n",
"TCL 50 XL NxtPaper 5G Memory Card (Hybrid) \n",
"TCL 50 XE NxtPaper 5G Memory Card Supported, upto 1 TB \n",
"TCL 40 NxtPaper 5G Memory Card Supported, upto 1 TB \n",
"TCL Trifold 50 MP + 48 MP + 8 MP Triple Rear &amp; 32 MP F... \n",
"\n",
" Android_version ... fast_charging \\\n",
"Name ... \n",
"Samsung Galaxy A13 12 ... 25W Fast Charging \n",
"Samsung Galaxy F23 12 ... NaN \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 11 ... 15W Fast Charging \n",
"Samsung Galaxy M13 5G 12 ... 15W Fast Charging \n",
"Samsung Galaxy M21 2021 11 ... 15W Fast Charging \n",
"... ... ... ... \n",
"TCL 40R 12 ... 15W Fast Charging \n",
"TCL 50 XL NxtPaper 5G 14 ... 33W Fast Charging \n",
"TCL 50 XE NxtPaper 5G 13 ... 18W Fast Charging \n",
"TCL 40 NxtPaper 5G 13 ... 15W Fast Charging \n",
"TCL Trifold 13 ... 67W Fast Charging \n",
"\n",
" Screen_resolution \\\n",
"Name \n",
"Samsung Galaxy A13 1080 x 2408 px Display with Water Drop Notch \n",
"Samsung Galaxy F23 720 x 1600 px \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 720 x 1600 px Display with Water Drop Notch \n",
"Samsung Galaxy M13 5G 720 x 1600 px \n",
"Samsung Galaxy M21 2021 1080 x 2340 px Display with Water Drop Notch \n",
"... ... \n",
"TCL 40R 720 x 1612 px \n",
"TCL 50 XL NxtPaper 5G 1200 x 2400 px \n",
"TCL 50 XE NxtPaper 5G 720 x 1612 px \n",
"TCL 40 NxtPaper 5G 720 x 1612 px \n",
"TCL Trifold 1916 x 2160 px \n",
"\n",
" Processor Processor_name \\\n",
"Name \n",
"Samsung Galaxy A13 2 GHz Processor Octa Core \n",
"Samsung Galaxy F23 Octa Core Helio G88 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) Octa Core Helio P35 \n",
"Samsung Galaxy M13 5G Octa Core Dimensity 700 \n",
"Samsung Galaxy M21 2021 Octa Core Exynos 9611 \n",
"... ... ... \n",
"TCL 40R Octa Core Dimensity 700 5G \n",
"TCL 50 XL NxtPaper 5G Octa Core Dimensity 7050 \n",
"TCL 50 XE NxtPaper 5G Octa Core Dimensity 6080 \n",
"TCL 40 NxtPaper 5G Octa Core Dimensity 6020 \n",
"TCL Trifold Octa Core Snapdragon 8 Gen2 \n",
"\n",
" Price_per_GB_RAM Price_Rating Ram_GB \\\n",
"Name \n",
"Samsung Galaxy A13 NaN NaN 4 \n",
"Samsung Galaxy F23 NaN NaN 4 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) NaN NaN 4 \n",
"Samsung Galaxy M13 5G NaN NaN 6 \n",
"Samsung Galaxy M21 2021 NaN NaN 4 \n",
"... ... ... ... \n",
"TCL 40R NaN NaN 4 \n",
"TCL 50 XL NxtPaper 5G NaN NaN 8 \n",
"TCL 50 XE NxtPaper 5G NaN NaN 6 \n",
"TCL 40 NxtPaper 5G NaN NaN 6 \n",
"TCL Trifold NaN NaN 12 \n",
"\n",
" Battery_mAh Screen_Type \\\n",
"Name \n",
"Samsung Galaxy A13 5000 2408 \n",
"Samsung Galaxy F23 6000 1600 \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 5000 1600 \n",
"Samsung Galaxy M13 5G 5000 1600 \n",
"Samsung Galaxy M21 2021 6000 2340 \n",
"... ... ... \n",
"TCL 40R 5000 1612 \n",
"TCL 50 XL NxtPaper 5G 5000 2400 \n",
"TCL 50 XE NxtPaper 5G 5000 1612 \n",
"TCL 40 NxtPaper 5G 5000 1612 \n",
"TCL Trifold 4600 2160 \n",
"\n",
" Total_Storage_GB \n",
"Name \n",
"Samsung Galaxy A13 64 GB inbuiltMemory Card Supported, upto 1 TB \n",
"Samsung Galaxy F23 64 GB inbuiltMemory Card Supported, upto 1 TB \n",
"Samsung Galaxy A03s (4GB RAM + 64GB) 64 GB inbuiltMemory Card Supported, upto 1 TB \n",
"Samsung Galaxy M13 5G 128 GB inbuiltMemory Card Supported, upto 1 TB \n",
"Samsung Galaxy M21 2021 64 GB inbuiltMemory Card Supported, upto 512 GB \n",
"... ... \n",
"TCL 40R 64 GB inbuiltMemory Card (Hybrid) \n",
"TCL 50 XL NxtPaper 5G 128 GB inbuiltMemory Card (Hybrid) \n",
"TCL 50 XE NxtPaper 5G 256 GB inbuiltMemory Card Supported, upto 1 TB \n",
"TCL 40 NxtPaper 5G 256 GB inbuiltMemory Card Supported, upto 1 TB \n",
"TCL Trifold 256 GB inbuilt50 MP + 48 MP + 8 MP Triple Rea... \n",
"\n",
"[1368 rows x 23 columns]"
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#df_dropped_columns = df.drop(columns=[\"Price_Rating\", \"Price_per_GB_RAM\"])\n",
"#df_dropped_columns\n",
"df[\"Total_Storage_GB\"] = df[\"Inbuilt_memory\"] + df[\"External_Memory\"]\n",
"df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Удаление строк с пустыми значениями"
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Unnamed: 0 0\n",
"Rating 0\n",
"Spec_score 0\n",
"No_of_sim 0\n",
"Ram 0\n",
"Battery 0\n",
"Display 0\n",
"Camera 0\n",
"External_Memory 0\n",
"Android_version 443\n",
"Price 1368\n",
"company 0\n",
"Inbuilt_memory 19\n",
"fast_charging 89\n",
"Screen_resolution 2\n",
"Processor 28\n",
"Processor_name 0\n",
"Price_per_GB_RAM 1368\n",
"Price_Rating 1368\n",
"Ram_GB 0\n",
"Battery_mAh 0\n",
"Screen_Type 2\n",
"Total_Storage_GB 19\n",
"dtype: int64\n"
]
}
],
"source": [
"print(df.isna().sum())"
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {},
"outputs": [
{
"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>Unnamed: 0</th>\n",
" <th>Rating</th>\n",
" <th>Spec_score</th>\n",
" <th>No_of_sim</th>\n",
" <th>Ram</th>\n",
" <th>Battery</th>\n",
" <th>Display</th>\n",
" <th>Camera</th>\n",
" <th>External_Memory</th>\n",
" <th>Android_version</th>\n",
" <th>...</th>\n",
" <th>fast_charging</th>\n",
" <th>Screen_resolution</th>\n",
" <th>Processor</th>\n",
" <th>Processor_name</th>\n",
" <th>Price_per_GB_RAM</th>\n",
" <th>Price_Rating</th>\n",
" <th>Ram_GB</th>\n",
" <th>Battery_mAh</th>\n",
" <th>Screen_Type</th>\n",
" <th>Total_Storage_GB</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Name</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"<p>0 rows × 23 columns</p>\n",
"</div>"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [Unnamed: 0, Rating, Spec_score, No_of_sim, Ram, Battery, Display, Camera, External_Memory, Android_version, Price, company, Inbuilt_memory, fast_charging, Screen_resolution, Processor, Processor_name, Price_per_GB_RAM, Price_Rating, Ram_GB, Battery_mAh, Screen_Type, Total_Storage_GB]\n",
"Index: []\n",
"\n",
"[0 rows x 23 columns]"
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.dropna()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"визуализация"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"линейная диаграмма"
]
},
{
"cell_type": "code",
"execution_count": 61,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function matplotlib.pyplot.show(close=None, block=None)>"
]
},
"execution_count": 61,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgA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4aSTTprtIgmCIAiCIAiCIAiCIAhCJYhuuiAIgiAIgiAIgiAIQgm0Wi0AAGg0Gpnb1mo1+PSnP21894UvfAFqtRqceuqp+rtbb70VarUaXHPNNaljLFmyBN72trcZ3x04cADe//73w9Of/nQYHR2FZz3rWfD5z38eoijS22zatAlqtRpcdtllsHjxYviDP/gDOOmkk+Dss8+GWq1mHFOlDVy7dq1xnrGxsdQ1PPnkk/AP//AP8OxnPxsWLlwIxx13HLzxjW+ETZs2pcp+9913w2mnnQYnnHCCkYrw1a9+dea9w+Wi/575zGca273tbW9LfbdlyxZYuHAh1Go1o2zXX389nH766fC0pz0NRkdH4aSTToJ///d/h06nY+x/6qmnsud+2cteprep1Wrwnve8B775zW/Cs5/9bFiwYAE873nPg+XLlxvH8r1n6npHRkZgz549xm+rVq3SZcDPSZXzz/7sz1L3713veheb+vG//uu/4IUvfCEcd9xxsHDhQnje857H1j1BEARBEARBEARBEIS5hihICYIgCIIgCIIgCIIglECz2QQAgJGRkeB9Dxw4AOecc06h809OTsJLXvIS2LZtG7zrXe+CZzzjGbBy5Ur42Mc+Bjt27IDzzjvPuu+jjz4KX/va1wqdf82aNbBy5Up405veBL/xG78BmzZtgosvvhhOPfVUePDBB2HRokUAAHDw4EF45StfCXEcwwc/+EF4+tOfDgDdlH+h4HSGX/ziF2H//v2Z+3zqU5+C6enp1PeXXXYZLFmyBD74wQ/CkiVL4Oabb4ZPfepTcOjQIfjCF75gbPsbv/EbqedF0xPedttt8J3vfAfe+973wujoKCxduhROO+00WL16tQ5M8r1nikajAVdddZVxr5YtWwYLFixgr2nBggXw4x//GHbv3g1PfepTAQBgamoKvvOd78CCBQtS259//vnwmte8Bs4880xoNptw9dVXwxvf+Eb40Y9+BKeffrrrtgqCIAiCIAiCIAiCIAw0EiAlCIIgCIIgCIIgCIJQAgcPHgQAgIULFwbve84558Dw8LCRmi+UL33pS/DYY4/B3XffDb/1W78FAF2loKc97WnwhS98AT70oQ/pYCTKxz/+cXj2s5+tryEPp59+Ovz5n/+58d0ZZ5wBL3jBC+Daa6+Ft7zlLQAAcOedd8KuXbvg29/+NrzpTW/S237iE5/wPpdS68LpDK+++urMAKkHHngArrjiCnjlK18JP/3pT43fvvWtbxnP7t3vfje8+93vhqVLl8JnP/tZGB0d1b8dc8wx8Nd//dfOc91///2wdu1aXb43velN8OxnPxs+9alPwfe//30A8L9nite97nWwbNkyHSA1OTkJ3/nOd+D1r389fOtb30qV4aSTToJGowFXXnklfOhDHwIAgGuvvRaOOuooOOWUU2Dfvn3G9hs3bjTuwXve8x547nOfC1/60pckQEoQBEEQBEEQBEEQhDmNpNgTBEEQBEEQBEEQBEEoARWcc9xxxwXtt23bNvjyl78Mn/zkJ2HJkiXsNocPH4axsTHjH+V73/sevPjFL4Zjjz3W2O5lL3sZdDqdVHo3xV133QXf+9734JxzzoF6nXcVHTx40DgmDawBMAPDWq0W7N27F571rGfBU57yFFi3bp1xLQDh9wmj1JI4FSQXH/vYx+C5z30uvPGNb0z9hsuv7veLX/ximJychA0bNgSX8QUveIER8PaMZzwDXvva18INN9yg0/b53jPFW97yFtiwYYNOpXfttdfCMcccAy996Uut5fibv/kbWLZsmf572bJl8Na3vpV91rg8+/fvh4MHD8KLX/xitiyCIAiCIAiCIAiCIAhzCVGQEgRBEARBEARBEARBKIEnn3wSFi1aBEcffXTQfv/6r/8KT3va0+Bd73oXXHPNNew2b3/72zOP88gjj8D69evhhBNOYH/fvXs3+/1HP/pRePGLXwyvfvWr4T3veQ+7zcte9rLM809NTcE555wDy5Ytg23btkEcx/o3rEz1/Oc/H4aHh+HTn/40HH/88VrVKoqizHMoVIDYMccc473P7bffDj/84Q/hpptugs2bN6d+f+CBB+ATn/gE3HzzzXDo0CHjtzzKWkrFC3PyySfD5OQk7NmzB37t137N+54pTjjhBDj99NPh0ksvhec///lw6aWXWoOdFGeeeSZ8+MMfhtWrV8NTn/pUuPXWW+GSSy6B22+/PbXtj370I/jsZz8L99xzD8zMzOjva7Va6OULgiAIgiAIgiAIgiAMFBIgJQiCIAiCIAiCIAiCUAIPP/wwPPvZzw7a56GHHoLLLrsMrrrqKhgeHrZu96lPfQpe/OIXG9+dccYZxt9RFMHLX/5y+PCHP8we4+STT0599/Of/xxuvPFGWLVqlbOcF110kbH/oUOH4A1veIOxzT/+4z/CsmXL4P3vfz+84AUvgGOOOQZqtRq86U1vMoKf/tf/+l+wbNkyeN/73gfPfe5zjWOccsopznIoNm3aBMPDw/C0pz3Na3sAgI985CPwile8Av7kT/4ELrvsMuO3AwcOwEte8hI4+uij4d/+7d/gpJNOggULFsC6devgIx/5SFDwVgi+9wzz9re/Hc466yz4x3/8R1i+fDl8/etfhxUrVljPccIJJ8AZZ5wBy5Ytg1/91V+FF73oRfCsZz0rtd2KFSvgNa95DfzxH/8xLF26FE488UQYHh6GZcuWsen7BEEQBEEQBEEQBEEQ5hISICUIgiAIgiAIgiAIglCQsbExeOCBB+Dd73530H4f+9jH4Pd+7/fgL//yL53b/e///b9TKk6NRsP4+6STToLx8XEvtScAgDiO4aMf/Si87nWvgz/8wz90bvv7v//78PznP1//zaX4u+aaa+Ctb30rfPGLX9TfTU9Pw4EDB1LbnnnmmbB582b4zGc+A1deeSUce+yx8Nd//dde5QYAWLt2LTz3uc91KidhrrvuOli1apU1Vdytt94
"text/plain": [
"<Figure size 3000x500 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(30, 5)) #графическое окно\n",
"df[\"Rating\"].plot(title=\"Линейная диаграмма\")\n",
"plt.show"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"столбчатая диаграмма"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function matplotlib.pyplot.show(close=None, block=None)>"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABMUAAARnCAYAAAD0etGEAAAAOXRFWHRTb2Z0d2FyZ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1mk2HDhsmiRYukWrVq4u/vLw0aNJD169c7bauwZeY4Xj8/P/n999+d0jZt2mTkYdu2bQXyefvttxcov6FDh4rNZpNatWo5ff7iiy9Ks2bNJCoqSgICAqRBgwaydOnSAusDAICbl8+NzgAAAPjzWL58uVSsWFGaNWtmueyCBQuM/2/YsEHmzp0r06dPlzJlyoiISExMjIiIXLp0SVq1aiUHDhyQYcOGSXJysixZskQGDBggZ8+eNb3qLO/2H330Uae006dPy9y5cyU4OFiGDx8u0dHRsnDhQunevbssWrRI7rnnniId96FDh2TZsmXSs2dPSU5OlpMnT8rrr78uLVu2lD179kh8fLykpKQ45Wnu3Lny008/yfTp043P6tSpIyIiW7dulW+//VZ69eol5cuXlyNHjsjs2bOlVatWsmfPHgkMDBQRkYyMDOnQoYOoqowcOVISEhJcHm9hTJgwQZKTk0VEZNq0aYV6CufYsWMlKyurwOfz58+X4OBgGTlypAQHB8vatWtl7NixkpmZKf/85z+dli1fvrxMnjzZ6bP8AdV169bJ+++/L8OHDxe73S6zZs2S2267Tb777jsjGFXYMnPw9vaWhQsXOpXVvHnzxN/f3+Ux+fv7y8qVK+W3336TsmXLisi1tvn++++Lv79/geVnzJghXbt2lT59+khOTo6899570rNnT1mxYoV06tTJXbECAICbhQIAABRCRkaGioh269atyOvOmzdPRUQPHz5cIO3ll19WEdGFCxcan+Xk5GhqaqoGBwdrZmam0/L/+Mc/1GazOX1WoUIF7d+/v/FeRFRE9OuvvzY+u3jxoqakpGhsbKzm5OSoqur48eNVRDQ3N9ft9rKysvTq1atOyxw+fFjtdrtOmDDB5TH3799fK1So4DLt4sWLBT7btGmTioi+8847xmdffPGFioi+++67BfLXqVMnl9vOb+7cuSoium3bNuOzTp06Fchb/vz+8MMP6uXlpR06dChQd67yP3ToUA0MDNSsrCzjs5YtW2rNmjXd5s9RV3nzd/ToUfX399c77rjD7T5dlZmjrd1zzz1au3Zt4/MLFy5oaGio9u7dW0VEt27dWiCfderU0RdffNH4fMGCBVq+fHn929/+VuA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6Wrp06SLz5s2T+fPnS/PmzaVy5coFltuwYYN07dpV/P39ZdasWfLZZ5/J6tWrpXfv3qI82B0AgD8NJtoHAACF1rlzZ5k7d65s2rRJUlNTS2WbFSpUkN27d0tubq7TVTyO2/AqVKjgtPyePXukfv36breZnJwse/fuLfC5Y5t5n7L47LPPypAhQ+Tnn382btVzXPXksHTpUmndurW8+eabTp+fPXvWeHBAUSxdulT69+8v06ZNMz7LysqSs2fPFli2T58+cuzYMRk/frwsWLBAIiIiCuTPnW3btkn9+vXdXiGV17Jly2TTpk2mtwF+/fXXcvr0afnoo4/k1ltvNT4/fPhwofOU3/79+wt8tm/fPgkMDJTo6GgRKVqZOXTo0EH8/f2lV69e0qJFC6lUqZJs2LDBbV7uvfde6dOnj4SFhRlPC83vww8/FH9/f/niiy+cbuXNe+slAAC4+XGlGAAAKLQnn3xSgoKCZPDgwXLy5MkC6QcPHpQZM2YUaZsdO3aU9PR0ef/9943Prly5Iq+88ooEBwc7zQu2bds2OXjwoMsrmPJv87vvvpNvv/3W+CwrK0tmz54tsbGxTvNXiVx7GmLr1q0lLS1N0tLSCsy/5e3tXeAKoCVLlsgvv/xSpGN1t71XXnnFCMrltWPHDnn
"text/plain": [
"<Figure size 1500x500 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize= (15, 5))\n",
"df[\"Total_Storage_GB\"].value_counts().plot(kind=\"bar\", title=\"Столбчатая диаграмма\")\n",
"plt.show"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"гистограмма"
]
},
{
"cell_type": "code",
"execution_count": 78,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function matplotlib.pyplot.show(close=None, block=None)>"
]
},
"execution_count": 78,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"<Figure size 1000x500 with 0 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkYAAAG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howYIByc3Nt5yorK9PTTz+t4OBgNW3aVMnJyUpMTNSQIUNcORwAAFwVwegG8e2332rXrl22H0ssLi5Wz549tWHDBn377bcaP368/vCHP+jLL7+UJC1YsECxsbF6/PHHlZubq9zcXJnN5irPfenSJb322mv6+9//rp07dyonJ0fTpk2zHZ89e7ZWrVql5cuX64svvlBBQYHWrVtX658ZAICa4lJaPbZ+/Xo1btxYZWVlslgs8vLy0sKFCyVJLVq0sAsvkydP1qZNm/TBBx/ozjvvVFBQkHx9feXv73/VS2elpaVasmSJ2rZtK0maNGmSZs2aZTv+1ltvKSUlRQ8++KAkaeHChfrkk0+c/XGBesXV6xgvq+l6RqC+IRjVY3379tXixYtVVFSkN954Qz4+Pho2bJikX3/R+9VXX9UHH3ygn376SSUlJbJYLPL396/x+/j7+9tCkSRFRETozJkzkqT8/HydPn1ad955p+24t7e3evbsqYqKiuv8hAAAOBeX0uqxm266Sbfccou6du2qZcuWac+ePVq6dKkkae7cuVqwYIGSk5O1bds2ZWVlqX///iopKanx+zRo0MBu32Qy8Vw5AIBHIhjdILy8vPTCCy9o+vTp+r//+z998cUXGjx4sEaPHq2uXbvq5ptv1uHDh+1e4+vrq/Ly8ut636CgIIWFhWnv3r22tvLych04cOC6zgsAQG0gGN1AHnroIXl7e2vRokVq166dMjIytGvXLn3//feaMGGCTp8+bdc/KipKe/bs0bFjx/Tzzz87fOlr8uTJSk1N1UcffaRDhw5pypQp+uWXX3jMCgCgziEY3UB8fHw0adIkzZkzR88++6x69Oih/v37q0+fPgoPD690+/y0adPk7e2tW2+9Vc2bN1dOTo5D75ucnKwRI0ZozJgxio2NVePGjdW/f38eDAsAqHNMVhaDqKCgQEFBQcrPz1dgYKDdseLiYh09elRt2rThi9xJKioq1KlTJz388MN65ZVXqu3H2ONGxl1prsE4e7YrfX87irvSUOuOHz+uf/7zn7r33ntlsVi0cOFCHT16VCNHjnR3aQAA2OFSGmqdl5eXVqxYoTvuuEN33XWXvvnmG23evFmdOnVyd2kAANhh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AwAgAAMBCMAAAADAQjAAAAA8EIAADAQDACAAAwEIwAAAAMBCMAAACDj7sLAAAArhH1/Aa3vO+xtIFueV9HMGMEAABgIBgBAAAYCEYAAAAGghEAAICBYAQAAGBwazDauXOnBg0apMjISJlMJq1bt87u+NixY2Uymey2AQMG2PU5f/68Ro0apcDAQAUHB2vcuHEqLCx04acAAAD1hVuDUVFRkbp27apFixZV22fAgAHKzc21be+9957d8VGjRum7775TRkaG1q9fr507d2r8+PG1XToAAKiH3Po7RvHx8YqPj79iHz8/P4WHh1d57Pvvv9fGjRu1d+9e3X777ZKkt956SwkJCXrttdcUGRnp9JoBAED9VefXGG3fvl2hoaHq0KGDnnzySZ07d852LDMzU8HBwbZQJEn9+vWTl5eX9uzZU+05LRaLCgoK7DYAAIA6HYwGDBigd999V1u2bNHs2bO1Y8cOxcfHq7y8XJKUl5en0NBQu9f4+PgoJCREeXl51Z43NTVVQUFBts1sNtfq5wAAAJ6hTj8SZPjw4bZ/d+nSRdHR0Wrbtq22b9+uuLg4h8+bkpKipKQk235BQQHhCAAA1O0Zo9+6+eab1axZM2VnZ0uSwsPDdebMGbs+ZWVlOn/+fLXrkqRf1y0FBgbabQAAAB4VjE6ePKlz584pIiJCkhQbG6sLFy5o//79tj5bt25VRUWFYmJi3FUmAAD
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize= (10, 5))\n",
"df.plot.hist(column=[\"Rating\"], bins = 15)\n",
"plt.show"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"ящик с усами"
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function matplotlib.pyplot.show(close=None, block=None)>"
]
},
"execution_count": 82,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA1AAABPPCAYAAACt9bZpAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAADLDklEQVR4nOzda7BV9X3/8e8BiyB6Dlq5nYrKYOKlora1pV7wUs8I3kYiJlWpVmU0qWLrNeIlXhKVitEWUoNjxhEbbWulSsEkjNTEQAxFYmO8jLcQqRoBa5FzFKtj4PwfOOw/p3L5mJAcLa/XzH5w1u+31/qt/UTfrLXXburs7OwsAAAANqlHdy8AAADgk0JAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAG7R8+fI6++yza+edd67f+q3fqqampsZr11137e7lAcBv3FbdvQAAPp7efffdOuSQQ2rx4sV1xhln1IgRI6p3795VVXXzzTfXm2++2c0rBIDfPAEFwHrNnDmzXnjhhbrsssvqhhtu6DL2T//0TwIKgC2SW/gAWK/FixdXVdXBBx8czW9qaqoJEyZ02Xbsscd+6Fa/GTNmVFNTUz3yyCONbdOnT6+mpqZasmRJY9uaNWtqn332qaamppo+fXpj++mnn/6hfd59993Vo0eP+uu//utNrnPlypV1wQUX1K677lpbb7117bTTTnXaaafVG2+8scH3HHroobXvvvuud2z33XevUaNGdVn3lClTavjw4dW7d+/q379/jR49un70ox815tx55531J3/yJzVgwIDaeuuta6+99qpp06Z9aN+77rprNTU11fnnn/+hsVGjRlVTU1Mde+yxjW2PPPLIhz7bqqpjjjmmmpqa6pprrtngOQKQEVAArNcOO+xQVdUlan6TvvnNb9ZTTz21yXkPPfRQnXnmmTVhwoSaOHHiRue+/fbbNXLkyPra175WRx55ZE2ZMqW+8IUv1HPPPVevvvrqBt936qmn1pNPPllPP/10l+2LFi2qF154of7sz/6ssW38+PF1/vnn15AhQ+rGG2+siRMnVu/evevf//3fG3OmTZtWu+yyS11++eV1880315AhQ+qcc86pW2+99UPH7t27d91zzz31/vvvN7a9+uqr9fDDDzduqdyYefPm1be//e1NzgMg4xY+ANbr+OOPr4kTJ9aXv/zlGjhwYJfvQK37P/O/Du+9915dddVVddRRR9V3vvOdDc57/PHHa+zYsTVmzJj627/9203u96abbqqnn3667r///vrMZz7T2H7llVdWZ2fnBt/32c9+ts4777y6++67u1zluvvuu6tv3751wgknVFXV9773vZo+fXr95V/+ZU2ZMqUx76KLLuqy/+9///vVp0+fxt8TJkyo0aNH1y233FLnnntul2OPHDmyfvzjH9esWbNq7NixVfXBFbsRI0bUz3/+802e8xe/+MVNfo4A5FyBAmC9Wltb64c//GENHz68TjzxxBoyZEj179+/+vfvXw899NCv9di33npr/fd//3ddffXVG5zzs5/9rI455pjab7/96pvf/Gb16LHp/6T9y7/8S+27775d4mmtpqamDb6vpaWljj/++PrHf/zHRgitXr267r333hozZkz17du3sf+mpqb1rnvd/a8bT+3t7fXGG2/UoYceWj/72c+qvb29y/t69epV48aNqzvvvLOxbfr06XXGGWds8nzvv//+WrRoUXRrIwAZAQXABv3u7/5ufec736lhw4bVTjvtVHPnzq25c+fWiBEjfm3HbG9vrxtuuKEuvPDCGjhw4HrnrFq1qkaNGlXLly+vFStWbDR+1rV48eLae++9f6l1nXbaafXyyy/X/Pnzq6rq3/7t32r58uV16qmndtl/a2tr4/bHDXn00Uerra2t+vbtW/369av+/fvX5ZdfXlX1oYCqqjrjjDNqzpw5tXTp0vr+979fS5curc997nMbPcbq1avr8ssvr3HjxtU+++zzUU8XgA0QUABs1G233VaLFy+uSZMmVVtbW7W1tdWOO+74azvejTfeWD169KhLLrlkg3PeeOONev/992v27Nn1/PPP16RJk35t61lr1KhRNXDgwLr77rur6oPb9wYNGlRtbW0faT+LFy+uI444ot5444265ZZb6lvf+lbNnTu3Lrjggqr64CEU/9u+++5b++67b/393/993XnnnTV27Nhqbm7e6HHuuOOOWrJkSX3lK1/5SOsDYOMEFAAb1N7eXtdee2394R/+YY0bN+7XfrzXXnutpkyZUldeeWVtt912G5y3zTbb1Jw5c+rYY4+tCy64oG644YZ69tlnN7n/YcOGfehBEKmePXvWKaecUjNmzKg333yzZs6cWSeffHL17Nmzy/5fe+21WrFixQb3M3v27Hrvvfdq1qxZ9fnPf76OPvroamtr63Jb3/qceeaZ9Y1vfKNmzJixydv33nnnnbr22mvrnHPOqV122eWjnSgAGyWgANigG264od544436m7/5m/g2uV/FtddeWwMHDqwvfOELG53Xv3//2mOPPaqq6stf/nLttNNOddZZZ230QRBVVWPHjq2f/OQn9cADD3xobFPvrfrgaXxvvvlmff7zn6+33367y9P31u6/s7Ozrr322g3uf21wrXu89vb2Lt9xWp9TTjmlfv7zn9eAAQPqsMMO2+jcKVOm1KpVq+qKK67Y5DkB8NF4Ch8A6/Wf//mfNXXq1Prc5z5XBx10UPSel19+uebMmdP4+7/+67/qf/7nf7pse+KJJ6qq6rHHHqtPfepT9Tu/8zuNsYceeqjuueee6tWrV7zOPn361O23315tbW01bdq0OuecczY495JLLqkZM2bUZz/72TrzzDPrD/7gD2rFihU1a9asuu222zb4W09r/d7v/V7tvffedd9999Wee+5Zv//7v99l/PDDD69TTz21pk6dWi+++GKNHj261qxZU/Pnz6/DDz+8JkyYUEceeWT16tWrjjvuuEaIfeMb36gBAwbU0qVLN3js7bffvpYuXVo9e/bcZMw+9NBDdf3119dv//Zvb3QeAB+dgAJgvS6//PLq7OysG2+8MX7P7Nmza/bs2R/aftRRR31o26WXXloDBgyo008/vbFtv/32q5NPPvkjr/WII46oM844oy677LI6/vjju0TZurbddtuaP39+XX311fXAAw/UXXfdVQMGDKgjjjiidtppp+hYp512Wn3xi1/s8vCIdd155521zz771B133FGXXHJJtbS01P77718HHnhgVX3ww7szZsyoK6+8si6++OIaNGhQ/cVf/EX179+/zjzzzI0eu1+/ftEaBw8evN4f3wXgV9fUmdyzAACb2WGHHVann356l4D6JJgyZUpdcMEFtWTJktp55527ezkA/Ib5DhQAhDo7O+uOO+6oQw89VDwBbKHcwgdAt/ijP/qjDd5q93GzatWqmjVrVn3ve9+rp556qv71X/+1u5cEQDdxCx8AbMKSJUtq6NCh1a9fvzrnnHPq+uuv7+4lAdBNBBQAAEDId6AAAABCAgoAACC0RT9EYs2aNfXaa6/Vdtttt8kfJQQAAP7v6uzsrLfeeqtaW1urR48NX2faogPqtddeqyFDhnT3MgAAgI+JV155ZaM/rr5FB9R2221XVR98SM3Nzd28GgAAoLt0dHTUkCFDGo2wIVt0QK29ba+5uVlAAQAAm/xqj4dIAAAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQEFAAAQEhAAQAAhAQUAABASEABAACEBBQAAEBIQAEAAIQ
"text/plain": [
"<Figure size 1000x6500 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize= (10, 65))\n",
"df[\"Battery_mAh\"].plot(kind = \"box\", title=\"Ящик с усами\")\n",
"plt.show"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"диаграммы с областями"
]
},
{
"cell_type": "code",
"execution_count": 70,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function matplotlib.pyplot.show(close=None, block=None)>"
]
},
"execution_count": 70,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"text/plain": [
"<Figure size 1000x500 with 0 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkUAAAHHCAYAAACx7iyPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6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2Lr/vPPOw3vf+17r2jHHHGN9/9SnPoW6ujpcc801WL16NW666SZs2rQJjz76KDzPAxA4UFVVVbj88stRVVWFhx9+GF/60pfQ09OD73znO1Z4ZWVl+NOf/oSWlhZMmDABADA4OIjbb78dZWVlsektKyvD0qVLrcb0zjvvxNDQ0E519Wb4l3/5Fyxbtgynn346/vVf/xXFYhGPP/44nnrqKRx++OHDPrds2TJceOGFOOKII3Dttddix44duP766/HEE0/g+eefR11dHdrb2wEA3/rWtzBp0iR8/vOfR1lZGW655RacfPLJeOCBB3D88cdHwp4/f752XNra2vC5z33O+v2OO+7AwMAALrvsMjQ2NuKZZ57BD3/4Q2zduhV33HGHvu/FF1/Ecccdh3Q6jUsuuQSzZs3CunXr8Ic//AFf//rX8YEPfAD777+/vv9zn/scDjzwQFxyySX62oEHHggAuP322/GJT3wCJ554Ij796U+jsrISr776Kr7xjW9E5H8j+c9Zu3Ytbrnllp3eJwh7FRIEYZc5+uijadGiRfp7a2srAaCrr77aus+9dsUVV9CECRPosMMOoxNOOEFfLxaLlMvlrGc7Oztp4sSJdNFFF+lrGzZsIAD0ne98Z1jZli5dSgDosMMOo3w+r69/+9vfJgB0991362sDAwOR5y+99FKqqKigoaEhfe2EE06ghQsX0uLFi+m73/2uvn7rrbfStGnT6LjjjqOFCxdG5DzvvPMolUrR9u3b9W/vfve76R//8R8j6bj66qsJALW2tg6btpkzZ9L5558/7O9ERA8//DABoM985jOR33zfH/a5fD5PEyZMoEWLFtHg4KC+/sc//pEA0Je+9CUrbZlMhtasWaPva21tpcbGRjrssMMiYR9zzDF00kkn6e8qjKVLl+prcXlx7bXXkud5tGnTJn3t+OOPp+rqauvaSGkbSWfnnXce1dXVWel95JFHCADdcccd+tobzX+evg9/+MO0aNEimj59+k7zUBD2FjJ9JghvgKGhoVH1jjlNTU344Q9/iKuuugpVVVXWb8lkEplMBkAw9dPR0YFisYjDDz8czz333BuS8ZJLLkE6ndbfL7vsMqRSKfz5z3/W18rLy/Xn3t5etLW14bjjjsPAwABee+21SJgXXnghli5dqr8vXboU559/PhKJeFNy6KGHYuHChbj11lsBAJs2bcIjjzwy4vRJR0cH2tra3vB5P7/97W/heR6uvvrqyG9qhCyO5cuXo6WlBZ/4xCesvD3jjDMwf/58/OlPf7LuP+ecc3DAAQfo7+PGjcMFF1yAFStWYMeOHda9+Xwe2Wx2RLl5XvT396OtrQ1HH300iAjPP/88AKC1tRWPPfYYLrroIsyYMWPUaRuO3t5eVFRUjLos72r+K1asWIE77rgD11577U7vFYS9iZROQXgDtLW1oba2dpeeufrqqzFlyhRceumlsb///Oc/x+LFi1FWVobGxkaMHz8ef/rTn9Dd3f2GZOQNNgBUVVVh8uTJ2Lhxo7728ssv4/3vfz9qa2tRU1OD8ePH42Mf+xgAxMb70Y9+FGvWrMEzzzyDjRs34tFHH93p+hDekC5btgxHH310RDbOvHnzMH78eFRVVWHixIn44he/GFnjNBLr1q3DlClT0NDQMOpngMBhU/G7zJ8/X/+unI/58+dH7lPTUlzHQDBt6jrCLps3b8YFF1yAhoYGVFVVYfz48TjhhBMAmLxYv349AFjrd94MRx11FJqbm3HNNddg8+bNaGtrG7G8vZH8B4D//M//xHHHHYczzzxzt8gtCHsKWVMkCLtIPp/Htm3bcMopp4z6mVdffRXLli3DbbfdZo3eKG677TZccMEFeN/73ofPf/7zmDBhApLJJK699lqsW7dud4qv6erqwgknnICamhp85StfwZw5c1BWVobnnnsO//Ef/wHf9yPPjB8/HmeddRaWLl2KiRMn4phjjrHWr8TxsY99DFdccQWeeuop/PznP8cXv/jFEe//7W9/i5qaGgwMDOCuu+7C17/+ddTU1OCKK654U+ndXfARndGyfft2nHrqqcP+XiqVcMopp6CjowP/8R//gfnz56OyshJNTU244IILYvNid/C5z30Oq1evxle/+lV8+ctf3un9byT/77//fjz44IN48sknd5fYgrDHEKdIEHaRF154AYVCYcQFuy5XXnklDj74YHzkIx+J/f03v/kN9ttvP9x5553WNEjcFNBoef3113HSSSfp7319fdi2bZteoP3oo4+ivb0dd955p7UweMOGDSOGe9FFF+GjH/0oamtrIzvr4mhsbMTZZ5+NSy+9FC0tLfjwhz884g6z448/HuPGjQMAnH322XjiiSdw7733jtopmjNnDu677z50dHTs0mjRzJkzAQCrV6/Gu971Luu31atX69/HjRuHqqoqrF69OhKGmnKcNWuWvrZ161b09vbqUaQ4XnrpJaxZswY///nP8c///M/6+gMPPGDdt99++wEAVq1aNep0jUR5eTluueUWPP/886itrcXVV1+NF154Af/v//2/YZ/ZlfwnIvznf/4n3v/+9+PII4/cLTILwp5Eps8EYRe54447kEwmRz0V8OSTT+Luu+/GN7/5zWHXfSSTSQBBI6J4+umn31Tv+n/+539QKBT095tuugnFYhGnn376sHHm83nceOONI4Z72mmnobKyEh0dHfjwhz88KlkuuugivPjii/jQhz6002kkDhGBiLSso+GDH/wgiCh25INGOJbt8MMPx4QJE/DjH/8YuVxOX7/nnnvw6quv4owzzgAAJBIJnHb
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from pyparsing import alphas\n",
"\n",
"\n",
"plt.figure(figsize= (10, 5))\n",
"df[[\"Rating\", \"Total_Storage_GB\"]].plot(\n",
" kind=\"area\", alpha=0.5, title=\"диаграммы с областями\"\n",
" )\n",
"plt.show"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"диаграмма рассеивания"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: xlabel='Rating', ylabel='Ram_GB'>"
]
},
"execution_count": 73,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAk8AAAGwCAYAAACw64E/AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA5U0lEQVR4nO3deXhU5d3/8c8kIQM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wgPAEAAJhAeAIAADCB8AQAAGAC4QkAAMAEwhMAAIAJhCcAAAATCE8AAAAmEJ4AAABMIDwBAACYQHgCAAAwgfAEAABgAuEJAADABMITAACACYQnAAAAEwhPAAAAJhCeAAAATCA8AQAAmEB4AgAAMIHwBAAAYALhCQAAwATCEwAAgAmEJwAAABMITwAAACYQngAAAEzwaXh66aWXZLFY3F6dO3d2tZ87d06JiYlq3ry5QkNDNWjQIOXm5rrNIzs7W/Hx8QoJCVFERISeeeYZlZSUuPVZt26devbsKavVqg4dOiglJcUbiwcAAOohn+95+ulPf6ojR464Xp999pmrLSkpSZ988ok++ugjrV+/XocPH9a9997rai8tLVV8fLyKioq0adMmLVy4UCkpKZoyZYqrz/79+xUfH68BAwYoKytL48aN0yOPPKK0tDSvLicAAKgfLIZhGL768JdeeknLly9XVlbWJW0FBQUKDw/XokWLdN9990mSdu3apS5duigjI0N9+vTRqlWrdOedd+rw4cOKjIyUJM2fP1/Jyck6evSogoODlZycrNTUVO3YscM17yFDhig/P1+rV6+uUp1Op1N2u10FBQWy2Ww1X3AAAOBxntp++3zP0549e9SqVStde+21GjZsmLKzsyVJmZmZKi4uVmxsrKtv586d1bZtW2VkZEiSMjIy1K1bN1dwkqS4uDg5nU7t3LnT1efCeZT3KZ9HRQoLC+V0Ot1eAAAAko/DU+/evZWSkqLVq1dr3rx52r9/v2699VadOnVKOTk5Cg4OVlhYmNt7IiMjlZOTI0nKyclxC07l7eVtlfVxOp368ccfK6xr+vTpstvtrld0dHRtLC4AAKgHgnz54b/85S9d/+7evbt69+6ta665RkuXLlWjRo18VtekSZM0fvx4189Op5MABQAAJNWBw3YXCgsL009+8hPt3btXUVFRKioqUn5+vluf3NxcRUVFSZKioqIuufqu/Ocr9bHZbJcNaFarVTabze0FAAAg1bHwdPr0af3nP/9Ry5Yt1atXLzVo0EBr1qxxte/evVvZ2dlyOBySJIfDoe3btysvL8/VJz09XTabTTExMa4+F86jvE/5PAAAAMzwaXiaMGGC1q9frwMHDmjTpk36zW9+o8DAQA0dOlR2u12jRo3S+PHj9emnnyozM1MjR46Uw+FQnz59JEkDBw5UTEyMhg8frq+++kppaWmaPHmyEhMTZbVaJUmjR4/Wvn379Oyzz2rXrl2aO3euli5dqqSkJF8uOgAA8FM+Pefp+++/19ChQ3X8+HGFh4frlltu0eeff67w8HBJ0muvvaaAgAANGjRIhYWFiouL09y5c13vDwwM1IoVKzRmzBg5HA41btxYCQkJevnll1192rdvr9TUVCUlJWn27Nlq06aN3n77bcXFxXl9eQEAgP/z6X2e/AX3eQIAwP/U2/s8AQAA+BPCEwAAgAmEJwAAABMITwAAACYQngAAAEwgPAEAAJhAeAIAADCB8AQAAGAC4QkAAMAEwhMAAIAJhCcAAAATCE8AAAAmEJ4AAABMIDwBAACYQHgCAAAwgfAEAABgAuEJAADABMITAACACYQnAAAAEwhPAAAAJhCeAAAATCA8AQAAmEB4AgAAMIHwBAAAYALhCQAAwATCEwAAgAmEJwA
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df.plot.scatter(x=\"Rating\", y =\"Ram_GB\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"круговая диаграмма"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<function matplotlib.pyplot.show(close=None, block=None)>"
]
},
"execution_count": 76,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAxoAAAGrCAYAAABHSeGrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8hTgPZAAAACXBIWXMAAA9hAAAPYQGoP6dpAABBrUlEQVR4nO3dd3hUVeLG8XcmbdJJQui9g4gUK0UQCyBdFxQQsaOIILLKWlZQfyugrruurq7urqCAiIKCKC6iVBUpKk0EpITeEpKQXmbu74+BQEyAAJOcKd/P8+QJmbkz885obuadc869NsuyLAEAAACAB9lNBwAAAADgfygaAAAAADyOogEAAADA4ygaAAAAADyOogEAAADA4ygaAAAAADyOogEAAADA4ygaAAAAADyOogEAAADA4ygaAAAAADyOogEAAADA4ygaAAAAADyOogEAAADA4ygaAPzGhAkTZLPZil22ZMkShYWF6cEHHyyx3ZYtWzRw4EDFxMQoISFBo0ePVm5ubtF2nTt31mWXXVbqYzVt2lTdunWTJCUlJclms5X6NX369KLb7Ny5UwMGDFB8fLwiIiJ09dVX64svvih2v0uXLi12+7CwMDVp0kQTJ06UZVlF2+3evVsjRoxQ06ZNFR4eroSEBA0YMEBJSUklsv7888/q3r27EhMTi913r169yvS6Tp06tdTnVq9evWLb3XXXXSUu27t3r8LDw2Wz2Yplmzdvnnr27KkaNWooLCxMDRs21AsvvCCn01ns9l26dCn1sW+44YaibWw2m0aOHKkZM2aoadOmcjgcateunZYvX17svsr6mp18vqGhoTp69Gix61auXFmUYe3atSVy9uvXr8TrN3z4cNlsNrVs2bLY5a+88orat2+vhIQEhYeHq127dpo9e3aJ2wOArwo2HQAAysv69evVr18/3XzzzfrnP/9Z4vqBAweqXr16mjhxon744Qf94x//UGpqqt5//31J0tChQ3X//fdr06ZNxd4krlmzRtu2bdMzzzxT7P4GDRqkm2++udhlHTp0kCQdPnxY7du3V3Z2tkaNGqWEhAS999576tOnj2bPnq3+/fsXu91TTz2l5s2bKycnR7NmzdJTTz2lKlWq6N577y3K8P333+v2229XrVq1lJSUpLfeektdunTR5s2bFRERIUlKT09Xjx49ZFmWHnvsMdWuXVuSNGbMmPN+PZ9//nnVr19fkvTXv/5Vqamp57zNs88+W6y8nTR16lRFRUXpscceU1RUlBYvXqxnn31Wx48f18svv1xs21q1amnixInFLqtevXqxn5ctW6ZZs2Zp1KhRCgsL05tvvqnu3btr9erVRf/tyvqanRQUFKTp06cXe62mTJkih8NR6nNyOBz64osvdOTIEVWpUkWSiv77ORyOEtu/9tpr6tOnj4YMGaL8/Hx9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P16TJk3SgAEDdMMNN5R5vcXmzZu1efNm9e3bt0zbO51OPfXUUxo8eLBat25d6jYnS9rp+fPz8/Xmm2+W6TFK8/tis3fvXs2bN0833XRT0eOdz2t2UnBwsO68805t2LBB99xzT5mydO/eXZGRkTp27JgGDhxY6jZBQUGy2WzFHjspKUlz584t02MAgC9gRAOA37LZbPrPf/6j1q1ba/z48XrppZeKXb9r1y716dNH3bt318qVKzV9+nQNHjy4xLkz2rRpo5YtW+rjjz9W8+bN1bZt2/PO8qc//UkzZ85Ujx49NGrUKMXHx+u9997Trl27NGfOnBKjBYsWLdK+fftUUFCgNWvWaMaMGerTp49CQ0MludehTJs2TbGxsWrRooVWrlypr7/+usSi7+zsbA0ePFhdunTR6NGjzyvzwoUL9cc//lG
"text/plain": [
"<Figure size 1000x500 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,5))\n",
"rat_counts = df [\"Rating\"].value_counts()\n",
"\n",
"#данные на 2 группы\n",
"under_4 = rat_counts[rat_counts.index<4].sum()\n",
"over_4 = rat_counts[rat_counts.index>4].sum()\n",
"\n",
"#создаем данные\n",
"labels = [\"до 4\", \"4 и выше\"]\n",
"sizes = [under_4, over_4] # размеры в процентах \n",
"\n",
"#строим\n",
"plt.pie(sizes, labels=labels, autopct=\"%1.1f%%\")\n",
"plt.title(\"круговая диаграмма\")\n",
"plt.axis(\"equal\") #чтобы круг\n",
"plt.show"
]
}
],
"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.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}