mirror of
https://github.com/mudabbir-ahmad/UNI-PROG3-CW2-MLWP.git
synced 2026-10-07 20:10:20 +00:00
1096 lines
35 KiB
Plaintext
1096 lines
35 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "markdown",
|
|
"source": "",
|
|
"id": "8a77807f92f26ee"
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T10:00:23.434531Z",
|
|
"start_time": "2026-04-25T10:00:23.381273Z"
|
|
}
|
|
},
|
|
"cell_type": "markdown",
|
|
"source": [
|
|
"## This is the Q1 Notebook!\n",
|
|
"\n",
|
|
"It's tracked via GitHub! hence the need for this line for the init commit"
|
|
],
|
|
"id": "193cc36275a60171"
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.486005100Z",
|
|
"start_time": "2026-04-25T13:28:40.480384400Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"import pandas as pd\n",
|
|
"import numpy as np"
|
|
],
|
|
"id": "edaea0c939a83b79",
|
|
"outputs": [],
|
|
"execution_count": 70
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.502729500Z",
|
|
"start_time": "2026-04-25T13:28:40.488006Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df = pd.read_csv('data/googleplaystore_new.csv')",
|
|
"id": "e657e9baacc13e6b",
|
|
"outputs": [],
|
|
"execution_count": 71
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "markdown",
|
|
"source": "## Part A\n",
|
|
"id": "751a6161e8e12bdd"
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.516572500Z",
|
|
"start_time": "2026-04-25T13:28:40.503729900Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"df = df.dropna()\n",
|
|
"df = df.drop_duplicates()"
|
|
],
|
|
"id": "756c92821453bbb3",
|
|
"outputs": [],
|
|
"execution_count": 72
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.537749600Z",
|
|
"start_time": "2026-04-25T13:28:40.517577900Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df.head(10)",
|
|
"id": "4e1be303d63f47a4",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
" App Category Rating Reviews Size \\\n",
|
|
"0 Market Update Helper LIBRARIES_AND_DEMO 4.1 20145 11k \n",
|
|
"1 SuperLivePro BUSINESS 4.3 46353 21M \n",
|
|
"2 Wifi Connect Library LIBRARIES_AND_DEMO 3.9 58055 41k \n",
|
|
"3 Apk Installer LIBRARIES_AND_DEMO 3.8 7750 292k \n",
|
|
"4 English speaking texts EDUCATION 4.4 1619 3.0M \n",
|
|
"5 Eternal life LIBRARIES_AND_DEMO 5.0 26 2.5M \n",
|
|
"6 Dresses Ideas & Fashions +3000 BEAUTY 4.5 473 8.2M \n",
|
|
"7 GO Notifier COMMUNICATION 4.2 124346 695k \n",
|
|
"8 Prosperity EVENTS 5.0 16 2.3M \n",
|
|
"9 NSE Mobile Trading FINANCE 4.1 13868 1.4M \n",
|
|
"\n",
|
|
" Installs Type Price Content Rating Genres Android Ver \n",
|
|
"0 1,000,000+ Free 0 Everyone Libraries & Demo 1.5 and up \n",
|
|
"1 1,000,000+ Free 0 Everyone Business 1.5 and up \n",
|
|
"2 5,000,000+ Free 0 Everyone Libraries & Demo 1.5 and up \n",
|
|
"3 1,000,000+ Free 0 Everyone Libraries & Demo 1.6 and up \n",
|
|
"4 1,000,000+ Free 0 Everyone Education 1.6 and up \n",
|
|
"5 1,000+ Free 0 Everyone Libraries & Demo 1.6 and up \n",
|
|
"6 100,000+ Free 0 Mature 17+ Beauty 1.6 and up \n",
|
|
"7 10,000,000+ Free 0 Everyone Communication 2.0 and up \n",
|
|
"8 100+ Free 0 Everyone Events 2.0 and up \n",
|
|
"9 1,000,000+ Free 0 Everyone Finance 2.1 and up "
|
|
],
|
|
"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>App</th>\n",
|
|
" <th>Category</th>\n",
|
|
" <th>Rating</th>\n",
|
|
" <th>Reviews</th>\n",
|
|
" <th>Size</th>\n",
|
|
" <th>Installs</th>\n",
|
|
" <th>Type</th>\n",
|
|
" <th>Price</th>\n",
|
|
" <th>Content Rating</th>\n",
|
|
" <th>Genres</th>\n",
|
|
" <th>Android Ver</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>Market Update Helper</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>4.1</td>\n",
|
|
" <td>20145</td>\n",
|
|
" <td>11k</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>SuperLivePro</td>\n",
|
|
" <td>BUSINESS</td>\n",
|
|
" <td>4.3</td>\n",
|
|
" <td>46353</td>\n",
|
|
" <td>21M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Business</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>Wifi Connect Library</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>3.9</td>\n",
|
|
" <td>58055</td>\n",
|
|
" <td>41k</td>\n",
|
|
" <td>5,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>Apk Installer</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>3.8</td>\n",
|
|
" <td>7750</td>\n",
|
|
" <td>292k</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>English speaking texts</td>\n",
|
|
" <td>EDUCATION</td>\n",
|
|
" <td>4.4</td>\n",
|
|
" <td>1619</td>\n",
|
|
" <td>3.0M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Education</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>Eternal life</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>5.0</td>\n",
|
|
" <td>26</td>\n",
|
|
" <td>2.5M</td>\n",
|
|
" <td>1,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>Dresses Ideas & Fashions +3000</td>\n",
|
|
" <td>BEAUTY</td>\n",
|
|
" <td>4.5</td>\n",
|
|
" <td>473</td>\n",
|
|
" <td>8.2M</td>\n",
|
|
" <td>100,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Mature 17+</td>\n",
|
|
" <td>Beauty</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>GO Notifier</td>\n",
|
|
" <td>COMMUNICATION</td>\n",
|
|
" <td>4.2</td>\n",
|
|
" <td>124346</td>\n",
|
|
" <td>695k</td>\n",
|
|
" <td>10,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Communication</td>\n",
|
|
" <td>2.0 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>Prosperity</td>\n",
|
|
" <td>EVENTS</td>\n",
|
|
" <td>5.0</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>2.3M</td>\n",
|
|
" <td>100+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Events</td>\n",
|
|
" <td>2.0 and up</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>NSE Mobile Trading</td>\n",
|
|
" <td>FINANCE</td>\n",
|
|
" <td>4.1</td>\n",
|
|
" <td>13868</td>\n",
|
|
" <td>1.4M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Finance</td>\n",
|
|
" <td>2.1 and up</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
]
|
|
},
|
|
"execution_count": 73,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 73
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:14:34.819448Z",
|
|
"start_time": "2026-04-25T13:14:34.807334900Z"
|
|
}
|
|
},
|
|
"cell_type": "markdown",
|
|
"source": "## Part B",
|
|
"id": "5e0e0e76635904b6"
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.562150300Z",
|
|
"start_time": "2026-04-25T13:28:40.543751400Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": [
|
|
"# Getting the column for size, checking if it's ending with an M or a k and converting the Mb to kb with 1024* and then again from kb to just b by another 1024*\n",
|
|
"def parse_size(size_str):\n",
|
|
" if isinstance(size_str, str):\n",
|
|
" if size_str.endswith('M'):\n",
|
|
" return float(size_str[:-1]) * 1024 * 1024\n",
|
|
" elif size_str.endswith('k'):\n",
|
|
" return float(size_str[:-1]) * 1024\n",
|
|
" return size_str"
|
|
],
|
|
"id": "c15cb7f9831e0f81",
|
|
"outputs": [],
|
|
"execution_count": 74
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.568463900Z",
|
|
"start_time": "2026-04-25T13:28:40.563149700Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df['Size in bytes'] = df['Size'].apply(parse_size)",
|
|
"id": "c76da70de24ddc72",
|
|
"outputs": [],
|
|
"execution_count": 75
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:50.368129Z",
|
|
"start_time": "2026-04-25T13:28:50.352002600Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df[['Size', 'Size in bytes']].head(10)",
|
|
"id": "73784ad66975e81f",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
" Size Size in bytes\n",
|
|
"0 11k 11264.0\n",
|
|
"1 21M 22020096.0\n",
|
|
"2 41k 41984.0\n",
|
|
"3 292k 299008.0\n",
|
|
"4 3.0M 3145728.0\n",
|
|
"5 2.5M 2621440.0\n",
|
|
"6 8.2M 8598323.2\n",
|
|
"7 695k 711680.0\n",
|
|
"8 2.3M 2411724.8\n",
|
|
"9 1.4M 1468006.4"
|
|
],
|
|
"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>Size</th>\n",
|
|
" <th>Size in bytes</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>11k</td>\n",
|
|
" <td>11264.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>21M</td>\n",
|
|
" <td>22020096.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>41k</td>\n",
|
|
" <td>41984.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>292k</td>\n",
|
|
" <td>299008.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>3.0M</td>\n",
|
|
" <td>3145728.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>2.5M</td>\n",
|
|
" <td>2621440.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>8.2M</td>\n",
|
|
" <td>8598323.2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>695k</td>\n",
|
|
" <td>711680.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>2.3M</td>\n",
|
|
" <td>2411724.8</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>1.4M</td>\n",
|
|
" <td>1468006.4</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
]
|
|
},
|
|
"execution_count": 81,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 81
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.608697900Z",
|
|
"start_time": "2026-04-25T13:28:40.593237200Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "print(11*1024) # Just checking the kb and mb conversion happened properly, by checking 2 of the values manually.",
|
|
"id": "7ac34d8bc88327a1",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"11264\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 77
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.639521100Z",
|
|
"start_time": "2026-04-25T13:28:40.619210900Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "print((21*1024)*1024) # Ideally this is the same as doing the calculation without the ( ) but just incase!",
|
|
"id": "f72b05042c5a16fa",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"22020096\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 78
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.656738800Z",
|
|
"start_time": "2026-04-25T13:28:40.641523100Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "print(1.4*1024*1024) # This one seemed odd... Checked on an online converted to double-check but turns out the 0.4 bytes shows up there too.",
|
|
"id": "dcaf54123ea0d75d",
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"1468006.4\n"
|
|
]
|
|
}
|
|
],
|
|
"execution_count": 79
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.678521Z",
|
|
"start_time": "2026-04-25T13:28:40.656738800Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df.head(10)",
|
|
"id": "3e1112ae100d010c",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
" App Category Rating Reviews Size \\\n",
|
|
"0 Market Update Helper LIBRARIES_AND_DEMO 4.1 20145 11k \n",
|
|
"1 SuperLivePro BUSINESS 4.3 46353 21M \n",
|
|
"2 Wifi Connect Library LIBRARIES_AND_DEMO 3.9 58055 41k \n",
|
|
"3 Apk Installer LIBRARIES_AND_DEMO 3.8 7750 292k \n",
|
|
"4 English speaking texts EDUCATION 4.4 1619 3.0M \n",
|
|
"5 Eternal life LIBRARIES_AND_DEMO 5.0 26 2.5M \n",
|
|
"6 Dresses Ideas & Fashions +3000 BEAUTY 4.5 473 8.2M \n",
|
|
"7 GO Notifier COMMUNICATION 4.2 124346 695k \n",
|
|
"8 Prosperity EVENTS 5.0 16 2.3M \n",
|
|
"9 NSE Mobile Trading FINANCE 4.1 13868 1.4M \n",
|
|
"\n",
|
|
" Installs Type Price Content Rating Genres Android Ver \\\n",
|
|
"0 1,000,000+ Free 0 Everyone Libraries & Demo 1.5 and up \n",
|
|
"1 1,000,000+ Free 0 Everyone Business 1.5 and up \n",
|
|
"2 5,000,000+ Free 0 Everyone Libraries & Demo 1.5 and up \n",
|
|
"3 1,000,000+ Free 0 Everyone Libraries & Demo 1.6 and up \n",
|
|
"4 1,000,000+ Free 0 Everyone Education 1.6 and up \n",
|
|
"5 1,000+ Free 0 Everyone Libraries & Demo 1.6 and up \n",
|
|
"6 100,000+ Free 0 Mature 17+ Beauty 1.6 and up \n",
|
|
"7 10,000,000+ Free 0 Everyone Communication 2.0 and up \n",
|
|
"8 100+ Free 0 Everyone Events 2.0 and up \n",
|
|
"9 1,000,000+ Free 0 Everyone Finance 2.1 and up \n",
|
|
"\n",
|
|
" Size in bytes \n",
|
|
"0 11264.0 \n",
|
|
"1 22020096.0 \n",
|
|
"2 41984.0 \n",
|
|
"3 299008.0 \n",
|
|
"4 3145728.0 \n",
|
|
"5 2621440.0 \n",
|
|
"6 8598323.2 \n",
|
|
"7 711680.0 \n",
|
|
"8 2411724.8 \n",
|
|
"9 1468006.4 "
|
|
],
|
|
"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>App</th>\n",
|
|
" <th>Category</th>\n",
|
|
" <th>Rating</th>\n",
|
|
" <th>Reviews</th>\n",
|
|
" <th>Size</th>\n",
|
|
" <th>Installs</th>\n",
|
|
" <th>Type</th>\n",
|
|
" <th>Price</th>\n",
|
|
" <th>Content Rating</th>\n",
|
|
" <th>Genres</th>\n",
|
|
" <th>Android Ver</th>\n",
|
|
" <th>Size in bytes</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>Market Update Helper</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>4.1</td>\n",
|
|
" <td>20145</td>\n",
|
|
" <td>11k</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" <td>11264.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>SuperLivePro</td>\n",
|
|
" <td>BUSINESS</td>\n",
|
|
" <td>4.3</td>\n",
|
|
" <td>46353</td>\n",
|
|
" <td>21M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Business</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" <td>22020096.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>Wifi Connect Library</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>3.9</td>\n",
|
|
" <td>58055</td>\n",
|
|
" <td>41k</td>\n",
|
|
" <td>5,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" <td>41984.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>Apk Installer</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>3.8</td>\n",
|
|
" <td>7750</td>\n",
|
|
" <td>292k</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>299008.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>English speaking texts</td>\n",
|
|
" <td>EDUCATION</td>\n",
|
|
" <td>4.4</td>\n",
|
|
" <td>1619</td>\n",
|
|
" <td>3.0M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Education</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>3145728.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>Eternal life</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>5.0</td>\n",
|
|
" <td>26</td>\n",
|
|
" <td>2.5M</td>\n",
|
|
" <td>1,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>2621440.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>Dresses Ideas & Fashions +3000</td>\n",
|
|
" <td>BEAUTY</td>\n",
|
|
" <td>4.5</td>\n",
|
|
" <td>473</td>\n",
|
|
" <td>8.2M</td>\n",
|
|
" <td>100,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Mature 17+</td>\n",
|
|
" <td>Beauty</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>8598323.2</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>GO Notifier</td>\n",
|
|
" <td>COMMUNICATION</td>\n",
|
|
" <td>4.2</td>\n",
|
|
" <td>124346</td>\n",
|
|
" <td>695k</td>\n",
|
|
" <td>10,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Communication</td>\n",
|
|
" <td>2.0 and up</td>\n",
|
|
" <td>711680.0</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>Prosperity</td>\n",
|
|
" <td>EVENTS</td>\n",
|
|
" <td>5.0</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>2.3M</td>\n",
|
|
" <td>100+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Events</td>\n",
|
|
" <td>2.0 and up</td>\n",
|
|
" <td>2411724.8</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>NSE Mobile Trading</td>\n",
|
|
" <td>FINANCE</td>\n",
|
|
" <td>4.1</td>\n",
|
|
" <td>13868</td>\n",
|
|
" <td>1.4M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Finance</td>\n",
|
|
" <td>2.1 and up</td>\n",
|
|
" <td>1468006.4</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
]
|
|
},
|
|
"execution_count": 80,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 80
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:28:40.682532800Z",
|
|
"start_time": "2026-04-25T13:28:40.678521Z"
|
|
}
|
|
},
|
|
"cell_type": "markdown",
|
|
"source": "# Part C",
|
|
"id": "9883e69704d0a69e"
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:29:54.733479400Z",
|
|
"start_time": "2026-04-25T13:29:54.718136700Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df['Numeric_installs'] = df['Installs'].str.replace('+', '').str.replace(',', '').astype(int)",
|
|
"id": "c8d4f46526918c20",
|
|
"outputs": [],
|
|
"execution_count": 82
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:30:07.364394100Z",
|
|
"start_time": "2026-04-25T13:30:07.347101500Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df.head(10)",
|
|
"id": "cffd24a82d242352",
|
|
"outputs": [
|
|
{
|
|
"data": {
|
|
"text/plain": [
|
|
" App Category Rating Reviews Size \\\n",
|
|
"0 Market Update Helper LIBRARIES_AND_DEMO 4.1 20145 11k \n",
|
|
"1 SuperLivePro BUSINESS 4.3 46353 21M \n",
|
|
"2 Wifi Connect Library LIBRARIES_AND_DEMO 3.9 58055 41k \n",
|
|
"3 Apk Installer LIBRARIES_AND_DEMO 3.8 7750 292k \n",
|
|
"4 English speaking texts EDUCATION 4.4 1619 3.0M \n",
|
|
"5 Eternal life LIBRARIES_AND_DEMO 5.0 26 2.5M \n",
|
|
"6 Dresses Ideas & Fashions +3000 BEAUTY 4.5 473 8.2M \n",
|
|
"7 GO Notifier COMMUNICATION 4.2 124346 695k \n",
|
|
"8 Prosperity EVENTS 5.0 16 2.3M \n",
|
|
"9 NSE Mobile Trading FINANCE 4.1 13868 1.4M \n",
|
|
"\n",
|
|
" Installs Type Price Content Rating Genres Android Ver \\\n",
|
|
"0 1,000,000+ Free 0 Everyone Libraries & Demo 1.5 and up \n",
|
|
"1 1,000,000+ Free 0 Everyone Business 1.5 and up \n",
|
|
"2 5,000,000+ Free 0 Everyone Libraries & Demo 1.5 and up \n",
|
|
"3 1,000,000+ Free 0 Everyone Libraries & Demo 1.6 and up \n",
|
|
"4 1,000,000+ Free 0 Everyone Education 1.6 and up \n",
|
|
"5 1,000+ Free 0 Everyone Libraries & Demo 1.6 and up \n",
|
|
"6 100,000+ Free 0 Mature 17+ Beauty 1.6 and up \n",
|
|
"7 10,000,000+ Free 0 Everyone Communication 2.0 and up \n",
|
|
"8 100+ Free 0 Everyone Events 2.0 and up \n",
|
|
"9 1,000,000+ Free 0 Everyone Finance 2.1 and up \n",
|
|
"\n",
|
|
" Size in bytes Numeric_installs \n",
|
|
"0 11264.0 1000000 \n",
|
|
"1 22020096.0 1000000 \n",
|
|
"2 41984.0 5000000 \n",
|
|
"3 299008.0 1000000 \n",
|
|
"4 3145728.0 1000000 \n",
|
|
"5 2621440.0 1000 \n",
|
|
"6 8598323.2 100000 \n",
|
|
"7 711680.0 10000000 \n",
|
|
"8 2411724.8 100 \n",
|
|
"9 1468006.4 1000000 "
|
|
],
|
|
"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>App</th>\n",
|
|
" <th>Category</th>\n",
|
|
" <th>Rating</th>\n",
|
|
" <th>Reviews</th>\n",
|
|
" <th>Size</th>\n",
|
|
" <th>Installs</th>\n",
|
|
" <th>Type</th>\n",
|
|
" <th>Price</th>\n",
|
|
" <th>Content Rating</th>\n",
|
|
" <th>Genres</th>\n",
|
|
" <th>Android Ver</th>\n",
|
|
" <th>Size in bytes</th>\n",
|
|
" <th>Numeric_installs</th>\n",
|
|
" </tr>\n",
|
|
" </thead>\n",
|
|
" <tbody>\n",
|
|
" <tr>\n",
|
|
" <th>0</th>\n",
|
|
" <td>Market Update Helper</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>4.1</td>\n",
|
|
" <td>20145</td>\n",
|
|
" <td>11k</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" <td>11264.0</td>\n",
|
|
" <td>1000000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>1</th>\n",
|
|
" <td>SuperLivePro</td>\n",
|
|
" <td>BUSINESS</td>\n",
|
|
" <td>4.3</td>\n",
|
|
" <td>46353</td>\n",
|
|
" <td>21M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Business</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" <td>22020096.0</td>\n",
|
|
" <td>1000000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>2</th>\n",
|
|
" <td>Wifi Connect Library</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>3.9</td>\n",
|
|
" <td>58055</td>\n",
|
|
" <td>41k</td>\n",
|
|
" <td>5,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.5 and up</td>\n",
|
|
" <td>41984.0</td>\n",
|
|
" <td>5000000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>3</th>\n",
|
|
" <td>Apk Installer</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>3.8</td>\n",
|
|
" <td>7750</td>\n",
|
|
" <td>292k</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>299008.0</td>\n",
|
|
" <td>1000000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>4</th>\n",
|
|
" <td>English speaking texts</td>\n",
|
|
" <td>EDUCATION</td>\n",
|
|
" <td>4.4</td>\n",
|
|
" <td>1619</td>\n",
|
|
" <td>3.0M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Education</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>3145728.0</td>\n",
|
|
" <td>1000000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>5</th>\n",
|
|
" <td>Eternal life</td>\n",
|
|
" <td>LIBRARIES_AND_DEMO</td>\n",
|
|
" <td>5.0</td>\n",
|
|
" <td>26</td>\n",
|
|
" <td>2.5M</td>\n",
|
|
" <td>1,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Libraries & Demo</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>2621440.0</td>\n",
|
|
" <td>1000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>6</th>\n",
|
|
" <td>Dresses Ideas & Fashions +3000</td>\n",
|
|
" <td>BEAUTY</td>\n",
|
|
" <td>4.5</td>\n",
|
|
" <td>473</td>\n",
|
|
" <td>8.2M</td>\n",
|
|
" <td>100,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Mature 17+</td>\n",
|
|
" <td>Beauty</td>\n",
|
|
" <td>1.6 and up</td>\n",
|
|
" <td>8598323.2</td>\n",
|
|
" <td>100000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>7</th>\n",
|
|
" <td>GO Notifier</td>\n",
|
|
" <td>COMMUNICATION</td>\n",
|
|
" <td>4.2</td>\n",
|
|
" <td>124346</td>\n",
|
|
" <td>695k</td>\n",
|
|
" <td>10,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Communication</td>\n",
|
|
" <td>2.0 and up</td>\n",
|
|
" <td>711680.0</td>\n",
|
|
" <td>10000000</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>8</th>\n",
|
|
" <td>Prosperity</td>\n",
|
|
" <td>EVENTS</td>\n",
|
|
" <td>5.0</td>\n",
|
|
" <td>16</td>\n",
|
|
" <td>2.3M</td>\n",
|
|
" <td>100+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Events</td>\n",
|
|
" <td>2.0 and up</td>\n",
|
|
" <td>2411724.8</td>\n",
|
|
" <td>100</td>\n",
|
|
" </tr>\n",
|
|
" <tr>\n",
|
|
" <th>9</th>\n",
|
|
" <td>NSE Mobile Trading</td>\n",
|
|
" <td>FINANCE</td>\n",
|
|
" <td>4.1</td>\n",
|
|
" <td>13868</td>\n",
|
|
" <td>1.4M</td>\n",
|
|
" <td>1,000,000+</td>\n",
|
|
" <td>Free</td>\n",
|
|
" <td>0</td>\n",
|
|
" <td>Everyone</td>\n",
|
|
" <td>Finance</td>\n",
|
|
" <td>2.1 and up</td>\n",
|
|
" <td>1468006.4</td>\n",
|
|
" <td>1000000</td>\n",
|
|
" </tr>\n",
|
|
" </tbody>\n",
|
|
"</table>\n",
|
|
"</div>"
|
|
]
|
|
},
|
|
"execution_count": 83,
|
|
"metadata": {},
|
|
"output_type": "execute_result"
|
|
}
|
|
],
|
|
"execution_count": 83
|
|
},
|
|
{
|
|
"metadata": {
|
|
"ExecuteTime": {
|
|
"end_time": "2026-04-25T13:33:04.723856400Z",
|
|
"start_time": "2026-04-25T13:33:04.710676Z"
|
|
}
|
|
},
|
|
"cell_type": "code",
|
|
"source": "df.to_csv('data/googleplaystore_new_new.csv', index=False)",
|
|
"id": "18ef1e2e7494cb33",
|
|
"outputs": [],
|
|
"execution_count": 86
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "markdown",
|
|
"source": "## Part D",
|
|
"id": "1818d3183dae5398"
|
|
},
|
|
{
|
|
"metadata": {},
|
|
"cell_type": "code",
|
|
"outputs": [],
|
|
"execution_count": null,
|
|
"source": "",
|
|
"id": "5a99edb9f8b29b12"
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 2
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython2",
|
|
"version": "2.7.6"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|