Furst/2 Чтение и базовые операции.ipynb

1196 lines
40 KiB
Plaintext
Raw Normal View History

2025-02-21 16:53:58 +00:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "ba11a033-8e76-4716-b365-57e2ad5e1ee1",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a2daf4d8-bec0-4590-9269-c3024236d3f1",
"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>Rank</th>\n",
" <th>Image Link</th>\n",
" <th>Title</th>\n",
" <th>Current</th>\n",
" <th>24h Peak</th>\n",
" <th>All-Time Peak</th>\n",
" <th>Genre</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Counter-Strike 2</td>\n",
" <td>1,015,721</td>\n",
" <td>1,276,702</td>\n",
" <td>1,818,773</td>\n",
" <td>First-person Shooter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Dota 2</td>\n",
" <td>702,487</td>\n",
" <td>805,624</td>\n",
" <td>1,295,114</td>\n",
" <td>MOBA (Multiplayer Online Battle Arena)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Banana</td>\n",
" <td>409,758</td>\n",
" <td>428,540</td>\n",
" <td>917,272</td>\n",
" <td>Unknown</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>PUBG: BATTLEGROUNDS</td>\n",
" <td>371,000</td>\n",
" <td>688,475</td>\n",
" <td>3,257,248</td>\n",
" <td>Battle Royale</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>ELDEN RING</td>\n",
" <td>294,359</td>\n",
" <td>319,707</td>\n",
" <td>953,426</td>\n",
" <td>Action RPG</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",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>96.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Soundpad</td>\n",
" <td>16,028</td>\n",
" <td>17,064</td>\n",
" <td>21,920</td>\n",
" <td>Simulation / Tycoon</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>97.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Supermarket Simulator</td>\n",
" <td>15,817</td>\n",
" <td>15,875</td>\n",
" <td>51,363</td>\n",
" <td>Vampire / Open world</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>98.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>V Rising</td>\n",
" <td>15,803</td>\n",
" <td>16,275</td>\n",
" <td>150,645</td>\n",
" <td>Tactical Shooter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>99.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Squad</td>\n",
" <td>15,729</td>\n",
" <td>19,288</td>\n",
" <td>35,151</td>\n",
" <td>Grand Strategy</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>100.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Victoria 3</td>\n",
" <td>15,609</td>\n",
" <td>17,598</td>\n",
" <td>70,100</td>\n",
" <td>Unknown</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>100 rows × 7 columns</p>\n",
"</div>"
],
"text/plain": [
" Rank Image Link \\\n",
"0 1.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"1 2.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"2 3.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"3 4.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"4 5.0 https://shared.cloudflare.steamstatic.com/stor... \n",
".. ... ... \n",
"95 96.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"96 97.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"97 98.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"98 99.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"99 100.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"\n",
" Title Current 24h Peak All-Time Peak \\\n",
"0 Counter-Strike 2 1,015,721 1,276,702 1,818,773 \n",
"1 Dota 2 702,487 805,624 1,295,114 \n",
"2 Banana 409,758 428,540 917,272 \n",
"3 PUBG: BATTLEGROUNDS 371,000 688,475 3,257,248 \n",
"4 ELDEN RING 294,359 319,707 953,426 \n",
".. ... ... ... ... \n",
"95 Soundpad 16,028 17,064 21,920 \n",
"96 Supermarket Simulator 15,817 15,875 51,363 \n",
"97 V Rising 15,803 16,275 150,645 \n",
"98 Squad 15,729 19,288 35,151 \n",
"99 Victoria 3 15,609 17,598 70,100 \n",
"\n",
" Genre \n",
"0 First-person Shooter \n",
"1 MOBA (Multiplayer Online Battle Arena) \n",
"2 Unknown \n",
"3 Battle Royale \n",
"4 Action RPG \n",
".. ... \n",
"95 Simulation / Tycoon \n",
"96 Vampire / Open world \n",
"97 Tactical Shooter \n",
"98 Grand Strategy \n",
"99 Unknown \n",
"\n",
"[100 rows x 7 columns]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_csv('sample-dataset-a-b-modules.csv')\n",
"#print (df)\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "a4b89d0a-7214-4d1c-972a-0872e65e527c",
"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>Rank</th>\n",
" <th>Image Link</th>\n",
" <th>Title</th>\n",
" <th>Current</th>\n",
" <th>24h Peak</th>\n",
" <th>All-Time Peak</th>\n",
" <th>Genre</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Counter-Strike 2</td>\n",
" <td>1,015,721</td>\n",
" <td>1,276,702</td>\n",
" <td>1,818,773</td>\n",
" <td>First-person Shooter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Dota 2</td>\n",
" <td>702,487</td>\n",
" <td>805,624</td>\n",
" <td>1,295,114</td>\n",
" <td>MOBA (Multiplayer Online Battle Arena)</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Banana</td>\n",
" <td>409,758</td>\n",
" <td>428,540</td>\n",
" <td>917,272</td>\n",
" <td>Unknown</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>PUBG: BATTLEGROUNDS</td>\n",
" <td>371,000</td>\n",
" <td>688,475</td>\n",
" <td>3,257,248</td>\n",
" <td>Battle Royale</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>ELDEN RING</td>\n",
" <td>294,359</td>\n",
" <td>319,707</td>\n",
" <td>953,426</td>\n",
" <td>Action RPG</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>6.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Once Human</td>\n",
" <td>229,441</td>\n",
" <td>231,668</td>\n",
" <td>231,668</td>\n",
" <td>Unknown</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>7.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>The First Descendant</td>\n",
" <td>196,521</td>\n",
" <td>201,888</td>\n",
" <td>264,860</td>\n",
" <td>Unknown</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>8.0</td>\n",
" <td>https://encrypted-tbn0.gstatic.com/images?q=tb...</td>\n",
" <td>Source SDK Base 2007</td>\n",
" <td>182,694</td>\n",
" <td>191,413</td>\n",
" <td>221,857</td>\n",
" <td>Tool / SDK</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>9.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Grand Theft Auto V</td>\n",
" <td>148,141</td>\n",
" <td>170,541</td>\n",
" <td>364,548</td>\n",
" <td>Action-Adventure</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>10.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Apex Legends</td>\n",
" <td>139,352</td>\n",
" <td>240,658</td>\n",
" <td>624,473</td>\n",
" <td>Battle Royale / First-person Shooter</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Rank Image Link \\\n",
"0 1.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"1 2.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"2 3.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"3 4.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"4 5.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"5 6.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"6 7.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"7 8.0 https://encrypted-tbn0.gstatic.com/images?q=tb... \n",
"8 9.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"9 10.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"\n",
" Title Current 24h Peak All-Time Peak \\\n",
"0 Counter-Strike 2 1,015,721 1,276,702 1,818,773 \n",
"1 Dota 2 702,487 805,624 1,295,114 \n",
"2 Banana 409,758 428,540 917,272 \n",
"3 PUBG: BATTLEGROUNDS 371,000 688,475 3,257,248 \n",
"4 ELDEN RING 294,359 319,707 953,426 \n",
"5 Once Human 229,441 231,668 231,668 \n",
"6 The First Descendant 196,521 201,888 264,860 \n",
"7 Source SDK Base 2007 182,694 191,413 221,857 \n",
"8 Grand Theft Auto V 148,141 170,541 364,548 \n",
"9 Apex Legends 139,352 240,658 624,473 \n",
"\n",
" Genre \n",
"0 First-person Shooter \n",
"1 MOBA (Multiplayer Online Battle Arena) \n",
"2 Unknown \n",
"3 Battle Royale \n",
"4 Action RPG \n",
"5 Unknown \n",
"6 Unknown \n",
"7 Tool / SDK \n",
"8 Action-Adventure \n",
"9 Battle Royale / First-person Shooter "
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.head(10)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "60a4bda6-48d6-4ce6-b534-1a5ad1aabb6f",
"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>Rank</th>\n",
" <th>Image Link</th>\n",
" <th>Title</th>\n",
" <th>Current</th>\n",
" <th>24h Peak</th>\n",
" <th>All-Time Peak</th>\n",
" <th>Genre</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>90</th>\n",
" <td>91.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Arma 3</td>\n",
" <td>17,158</td>\n",
" <td>20,052</td>\n",
" <td>56,679</td>\n",
" <td>Racing / Open world</td>\n",
" </tr>\n",
" <tr>\n",
" <th>91</th>\n",
" <td>92.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Forza Horizon 5</td>\n",
" <td>17,070</td>\n",
" <td>22,071</td>\n",
" <td>81,096</td>\n",
" <td>MMORPG</td>\n",
" </tr>\n",
" <tr>\n",
" <th>92</th>\n",
" <td>93.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>The Elder Scrolls Online</td>\n",
" <td>16,481</td>\n",
" <td>16,505</td>\n",
" <td>49,234</td>\n",
" <td>Action RPG</td>\n",
" </tr>\n",
" <tr>\n",
" <th>93</th>\n",
" <td>94.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Hogwarts Legacy</td>\n",
" <td>16,430</td>\n",
" <td>16,712</td>\n",
" <td>879,308</td>\n",
" <td>Sports / Basketball Simulation</td>\n",
" </tr>\n",
" <tr>\n",
" <th>94</th>\n",
" <td>95.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>NBA 2K24</td>\n",
" <td>16,255</td>\n",
" <td>23,565</td>\n",
" <td>30,363</td>\n",
" <td>Utility / Audio</td>\n",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>96.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Soundpad</td>\n",
" <td>16,028</td>\n",
" <td>17,064</td>\n",
" <td>21,920</td>\n",
" <td>Simulation / Tycoon</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>97.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Supermarket Simulator</td>\n",
" <td>15,817</td>\n",
" <td>15,875</td>\n",
" <td>51,363</td>\n",
" <td>Vampire / Open world</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>98.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>V Rising</td>\n",
" <td>15,803</td>\n",
" <td>16,275</td>\n",
" <td>150,645</td>\n",
" <td>Tactical Shooter</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>99.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Squad</td>\n",
" <td>15,729</td>\n",
" <td>19,288</td>\n",
" <td>35,151</td>\n",
" <td>Grand Strategy</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>100.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Victoria 3</td>\n",
" <td>15,609</td>\n",
" <td>17,598</td>\n",
" <td>70,100</td>\n",
" <td>Unknown</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Rank Image Link \\\n",
"90 91.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"91 92.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"92 93.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"93 94.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"94 95.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"95 96.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"96 97.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"97 98.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"98 99.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"99 100.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"\n",
" Title Current 24h Peak All-Time Peak \\\n",
"90 Arma 3 17,158 20,052 56,679 \n",
"91 Forza Horizon 5 17,070 22,071 81,096 \n",
"92 The Elder Scrolls Online 16,481 16,505 49,234 \n",
"93 Hogwarts Legacy 16,430 16,712 879,308 \n",
"94 NBA 2K24 16,255 23,565 30,363 \n",
"95 Soundpad 16,028 17,064 21,920 \n",
"96 Supermarket Simulator 15,817 15,875 51,363 \n",
"97 V Rising 15,803 16,275 150,645 \n",
"98 Squad 15,729 19,288 35,151 \n",
"99 Victoria 3 15,609 17,598 70,100 \n",
"\n",
" Genre \n",
"90 Racing / Open world \n",
"91 MMORPG \n",
"92 Action RPG \n",
"93 Sports / Basketball Simulation \n",
"94 Utility / Audio \n",
"95 Simulation / Tycoon \n",
"96 Vampire / Open world \n",
"97 Tactical Shooter \n",
"98 Grand Strategy \n",
"99 Unknown "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.tail(10)"
]
},
{
"cell_type": "code",
"execution_count": 30,
"id": "c0b96588-c5de-44da-b078-ce44b3177939",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 Counter-Strike 2\n",
"1 Dota 2\n",
"2 Banana\n",
"3 PUBG: BATTLEGROUNDS\n",
"4 ELDEN RING\n",
" ... \n",
"95 Soundpad\n",
"96 Supermarket Simulator\n",
"97 V Rising\n",
"98 Squad\n",
"99 Victoria 3\n",
"Name: Title, Length: 100, dtype: object"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.Title"
]
},
{
"cell_type": "code",
"execution_count": 32,
"id": "89b843aa-0cba-4655-87a7-855c236b4b5f",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"pandas.core.series.Series"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"type(df.Title)"
]
},
{
"cell_type": "code",
"execution_count": 34,
"id": "d7d92286-a2ba-4c71-b0e0-e6f2e167a696",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 Counter-Strike 2\n",
"1 Dota 2\n",
"2 Banana\n",
"3 PUBG: BATTLEGROUNDS\n",
"4 ELDEN RING\n",
" ... \n",
"95 Soundpad\n",
"96 Supermarket Simulator\n",
"97 V Rising\n",
"98 Squad\n",
"99 Victoria 3\n",
"Name: Title, Length: 100, dtype: object"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Title']"
]
},
{
"cell_type": "code",
"execution_count": 42,
"id": "0ee09a68-46c8-443d-887f-7607d03ea60f",
"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>Rank</th>\n",
" <th>Title</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>Counter-Strike 2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2.0</td>\n",
" <td>Dota 2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3.0</td>\n",
" <td>Banana</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4.0</td>\n",
" <td>PUBG: BATTLEGROUNDS</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5.0</td>\n",
" <td>ELDEN RING</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>96.0</td>\n",
" <td>Soundpad</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>97.0</td>\n",
" <td>Supermarket Simulator</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>98.0</td>\n",
" <td>V Rising</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>99.0</td>\n",
" <td>Squad</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>100.0</td>\n",
" <td>Victoria 3</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>100 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
" Rank Title\n",
"0 1.0 Counter-Strike 2\n",
"1 2.0 Dota 2\n",
"2 3.0 Banana\n",
"3 4.0 PUBG: BATTLEGROUNDS\n",
"4 5.0 ELDEN RING\n",
".. ... ...\n",
"95 96.0 Soundpad\n",
"96 97.0 Supermarket Simulator\n",
"97 98.0 V Rising\n",
"98 99.0 Squad\n",
"99 100.0 Victoria 3\n",
"\n",
"[100 rows x 2 columns]"
]
},
"execution_count": 42,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[['Rank','Title']]"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "c892c58e-9c1f-4376-9907-2cf11fb4018b",
"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>Title</th>\n",
" <th>Rank</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Counter-Strike 2</td>\n",
" <td>1.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Dota 2</td>\n",
" <td>2.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Banana</td>\n",
" <td>3.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>PUBG: BATTLEGROUNDS</td>\n",
" <td>4.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>ELDEN RING</td>\n",
" <td>5.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>Soundpad</td>\n",
" <td>96.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>Supermarket Simulator</td>\n",
" <td>97.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>V Rising</td>\n",
" <td>98.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>Squad</td>\n",
" <td>99.0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>Victoria 3</td>\n",
" <td>100.0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>100 rows × 2 columns</p>\n",
"</div>"
],
"text/plain": [
" Title Rank\n",
"0 Counter-Strike 2 1.0\n",
"1 Dota 2 2.0\n",
"2 Banana 3.0\n",
"3 PUBG: BATTLEGROUNDS 4.0\n",
"4 ELDEN RING 5.0\n",
".. ... ...\n",
"95 Soundpad 96.0\n",
"96 Supermarket Simulator 97.0\n",
"97 V Rising 98.0\n",
"98 Squad 99.0\n",
"99 Victoria 3 100.0\n",
"\n",
"[100 rows x 2 columns]"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[['Title','Rank']]"
]
},
{
"cell_type": "code",
"execution_count": 53,
"id": "3b60f53a-fafb-4693-9921-a33e560175e9",
"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>Rank</th>\n",
" <th>Image Link</th>\n",
" <th>Title</th>\n",
" <th>Current</th>\n",
" <th>24h Peak</th>\n",
" <th>All-Time Peak</th>\n",
" <th>Genre</th>\n",
" <th>Total</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Counter-Strike 2</td>\n",
" <td>1,015,721</td>\n",
" <td>1,276,702</td>\n",
" <td>1,818,773</td>\n",
" <td>First-person Shooter</td>\n",
" <td>1,818,7731,818,773</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Dota 2</td>\n",
" <td>702,487</td>\n",
" <td>805,624</td>\n",
" <td>1,295,114</td>\n",
" <td>MOBA (Multiplayer Online Battle Arena)</td>\n",
" <td>1,295,1141,295,114</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Banana</td>\n",
" <td>409,758</td>\n",
" <td>428,540</td>\n",
" <td>917,272</td>\n",
" <td>Unknown</td>\n",
" <td>917,272917,272</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>PUBG: BATTLEGROUNDS</td>\n",
" <td>371,000</td>\n",
" <td>688,475</td>\n",
" <td>3,257,248</td>\n",
" <td>Battle Royale</td>\n",
" <td>3,257,2483,257,248</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>ELDEN RING</td>\n",
" <td>294,359</td>\n",
" <td>319,707</td>\n",
" <td>953,426</td>\n",
" <td>Action RPG</td>\n",
" <td>953,426953,426</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",
" </tr>\n",
" <tr>\n",
" <th>95</th>\n",
" <td>96.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Soundpad</td>\n",
" <td>16,028</td>\n",
" <td>17,064</td>\n",
" <td>21,920</td>\n",
" <td>Simulation / Tycoon</td>\n",
" <td>21,92021,920</td>\n",
" </tr>\n",
" <tr>\n",
" <th>96</th>\n",
" <td>97.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Supermarket Simulator</td>\n",
" <td>15,817</td>\n",
" <td>15,875</td>\n",
" <td>51,363</td>\n",
" <td>Vampire / Open world</td>\n",
" <td>51,36351,363</td>\n",
" </tr>\n",
" <tr>\n",
" <th>97</th>\n",
" <td>98.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>V Rising</td>\n",
" <td>15,803</td>\n",
" <td>16,275</td>\n",
" <td>150,645</td>\n",
" <td>Tactical Shooter</td>\n",
" <td>150,645150,645</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98</th>\n",
" <td>99.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Squad</td>\n",
" <td>15,729</td>\n",
" <td>19,288</td>\n",
" <td>35,151</td>\n",
" <td>Grand Strategy</td>\n",
" <td>35,15135,151</td>\n",
" </tr>\n",
" <tr>\n",
" <th>99</th>\n",
" <td>100.0</td>\n",
" <td>https://shared.cloudflare.steamstatic.com/stor...</td>\n",
" <td>Victoria 3</td>\n",
" <td>15,609</td>\n",
" <td>17,598</td>\n",
" <td>70,100</td>\n",
" <td>Unknown</td>\n",
" <td>70,10070,100</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>100 rows × 8 columns</p>\n",
"</div>"
],
"text/plain": [
" Rank Image Link \\\n",
"0 1.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"1 2.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"2 3.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"3 4.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"4 5.0 https://shared.cloudflare.steamstatic.com/stor... \n",
".. ... ... \n",
"95 96.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"96 97.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"97 98.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"98 99.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"99 100.0 https://shared.cloudflare.steamstatic.com/stor... \n",
"\n",
" Title Current 24h Peak All-Time Peak \\\n",
"0 Counter-Strike 2 1,015,721 1,276,702 1,818,773 \n",
"1 Dota 2 702,487 805,624 1,295,114 \n",
"2 Banana 409,758 428,540 917,272 \n",
"3 PUBG: BATTLEGROUNDS 371,000 688,475 3,257,248 \n",
"4 ELDEN RING 294,359 319,707 953,426 \n",
".. ... ... ... ... \n",
"95 Soundpad 16,028 17,064 21,920 \n",
"96 Supermarket Simulator 15,817 15,875 51,363 \n",
"97 V Rising 15,803 16,275 150,645 \n",
"98 Squad 15,729 19,288 35,151 \n",
"99 Victoria 3 15,609 17,598 70,100 \n",
"\n",
" Genre Total \n",
"0 First-person Shooter 1,818,7731,818,773 \n",
"1 MOBA (Multiplayer Online Battle Arena) 1,295,1141,295,114 \n",
"2 Unknown 917,272917,272 \n",
"3 Battle Royale 3,257,2483,257,248 \n",
"4 Action RPG 953,426953,426 \n",
".. ... ... \n",
"95 Simulation / Tycoon 21,92021,920 \n",
"96 Vampire / Open world 51,36351,363 \n",
"97 Tactical Shooter 150,645150,645 \n",
"98 Grand Strategy 35,15135,151 \n",
"99 Unknown 70,10070,100 \n",
"\n",
"[100 rows x 8 columns]"
]
},
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df['Total'] = df['All-Time Peak'] * 2\n",
"df"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "87766395-4255-4cf8-9a5c-1436646f099f",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "ec2fd89e-aa66-41df-8fba-48cf1e45572d",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "5a4f72e3-7f14-44fd-a9d1-f37c9dde49dd",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "29be5268-19ff-4df9-ad22-2c93a95683ac",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "e64e2162-3b16-47b1-a75f-c9233e4c0850",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python [conda env:base] *",
"language": "python",
"name": "conda-base-py"
},
"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.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}