ium_434695/Zadanie1.ipynb

959 lines
102 KiB
Plaintext
Raw Normal View History

2021-03-21 23:00:03 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "hNYAM1jr8P8v",
"outputId": "318f51a0-e7a8-4d69-86f3-3412ca800459"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/bin/sh: 1: wget: not found\r\n"
]
}
],
"source": [
"!wget -c https://git.wmi.amu.edu.pl/s434695/ium_434695/raw/commit/2301fb86e434734376f73503307a8f3255a75cc6/vgsales.csv\n"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "l6wJKCw7iqQ8",
"outputId": "91fcfedc-4cdf-4208-9a9e-a02b56b6db83"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Requirement already satisfied: pandas in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (1.2.3)\n",
"Requirement already satisfied: pytz>=2017.3 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from pandas) (2021.1)\n",
"Requirement already satisfied: python-dateutil>=2.7.3 in /snap/jupyter/6/lib/python3.7/site-packages (from pandas) (2.8.0)\n",
"Requirement already satisfied: numpy>=1.16.5 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from pandas) (1.20.1)\n",
"Requirement already satisfied: six>=1.5 in /snap/jupyter/6/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas) (1.12.0)\n",
"Requirement already satisfied: scikit-learn in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (0.24.1)\n",
"Requirement already satisfied: joblib>=0.11 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from scikit-learn) (1.0.1)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from scikit-learn) (2.1.0)\n",
"Requirement already satisfied: numpy>=1.13.3 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from scikit-learn) (1.20.1)\n",
"Requirement already satisfied: scipy>=0.19.1 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from scikit-learn) (1.6.1)\n",
"Requirement already satisfied: matplotlib in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (3.3.4)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib) (1.3.1)\n",
"Requirement already satisfied: pillow>=6.2.0 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib) (8.1.2)\n",
"Requirement already satisfied: python-dateutil>=2.1 in /snap/jupyter/6/lib/python3.7/site-packages (from matplotlib) (2.8.0)\n",
"Requirement already satisfied: numpy>=1.15 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib) (1.20.1)\n",
"Requirement already satisfied: cycler>=0.10 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib) (0.10.0)\n",
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib) (2.4.7)\n",
"Requirement already satisfied: six>=1.5 in /snap/jupyter/6/lib/python3.7/site-packages (from python-dateutil>=2.1->matplotlib) (1.12.0)\n",
"Collecting seaborn\n",
"\u001b[?25l Downloading https://files.pythonhosted.org/packages/68/ad/6c2406ae175f59ec616714e408979b674fe27b9587f79d59a528ddfbcd5b/seaborn-0.11.1-py3-none-any.whl (285kB)\n",
"\u001b[K |████████████████████████████████| 286kB 1.1MB/s eta 0:00:01\n",
"\u001b[?25hRequirement already satisfied: scipy>=1.0 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from seaborn) (1.6.1)\n",
"Requirement already satisfied: matplotlib>=2.2 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from seaborn) (3.3.4)\n",
"Requirement already satisfied: numpy>=1.15 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from seaborn) (1.20.1)\n",
"Requirement already satisfied: pandas>=0.23 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from seaborn) (1.2.3)\n",
"Requirement already satisfied: python-dateutil>=2.1 in /snap/jupyter/6/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (2.8.0)\n",
"Requirement already satisfied: pillow>=6.2.0 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (8.1.2)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (1.3.1)\n",
"Requirement already satisfied: cycler>=0.10 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (0.10.0)\n",
"Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from matplotlib>=2.2->seaborn) (2.4.7)\n",
"Requirement already satisfied: pytz>=2017.3 in /home/tomasz/snap/jupyter/common/lib/python3.7/site-packages (from pandas>=0.23->seaborn) (2021.1)\n",
"Requirement already satisfied: six>=1.5 in /snap/jupyter/6/lib/python3.7/site-packages (from python-dateutil>=2.1->matplotlib>=2.2->seaborn) (1.12.0)\n",
"Installing collected packages: seaborn\n",
"Successfully installed seaborn-0.11.1\n"
]
}
],
"source": [
"!pip install --user pandas\n",
"!pip install --user scikit-learn\n",
"!pip install --user matplotlib\n",
"!pip install --user seaborn"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 493
},
"id": "uXRk5Z4tixiJ",
"outputId": "ed788406-9f0f-418c-93ef-54398dc4613d"
},
"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>Name</th>\n",
" <th>Platform</th>\n",
" <th>Year</th>\n",
" <th>Genre</th>\n",
" <th>Publisher</th>\n",
" <th>NA_Sales</th>\n",
" <th>EU_Sales</th>\n",
" <th>JP_Sales</th>\n",
" <th>Other_Sales</th>\n",
" <th>Global_Sales</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>Wii Sports</td>\n",
" <td>Wii</td>\n",
" <td>2006.0</td>\n",
" <td>Sports</td>\n",
" <td>Nintendo</td>\n",
" <td>41.49</td>\n",
" <td>29.02</td>\n",
" <td>3.77</td>\n",
" <td>8.46</td>\n",
" <td>82.74</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2</td>\n",
" <td>Super Mario Bros.</td>\n",
" <td>NES</td>\n",
" <td>1985.0</td>\n",
" <td>Platform</td>\n",
" <td>Nintendo</td>\n",
" <td>29.08</td>\n",
" <td>3.58</td>\n",
" <td>6.81</td>\n",
" <td>0.77</td>\n",
" <td>40.24</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>3</td>\n",
" <td>Mario Kart Wii</td>\n",
" <td>Wii</td>\n",
" <td>2008.0</td>\n",
" <td>Racing</td>\n",
" <td>Nintendo</td>\n",
" <td>15.85</td>\n",
" <td>12.88</td>\n",
" <td>3.79</td>\n",
" <td>3.31</td>\n",
" <td>35.82</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>4</td>\n",
" <td>Wii Sports Resort</td>\n",
" <td>Wii</td>\n",
" <td>2009.0</td>\n",
" <td>Sports</td>\n",
" <td>Nintendo</td>\n",
" <td>15.75</td>\n",
" <td>11.01</td>\n",
" <td>3.28</td>\n",
" <td>2.96</td>\n",
" <td>33.00</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>5</td>\n",
" <td>Pokemon Red/Pokemon Blue</td>\n",
" <td>GB</td>\n",
" <td>1996.0</td>\n",
" <td>Role-Playing</td>\n",
" <td>Nintendo</td>\n",
" <td>11.27</td>\n",
" <td>8.89</td>\n",
" <td>10.22</td>\n",
" <td>1.00</td>\n",
" <td>31.37</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",
" </tr>\n",
" <tr>\n",
" <th>16593</th>\n",
" <td>16596</td>\n",
" <td>Woody Woodpecker in Crazy Castle 5</td>\n",
" <td>GBA</td>\n",
" <td>2002.0</td>\n",
" <td>Platform</td>\n",
" <td>Kemco</td>\n",
" <td>0.01</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16594</th>\n",
" <td>16597</td>\n",
" <td>Men in Black II: Alien Escape</td>\n",
" <td>GC</td>\n",
" <td>2003.0</td>\n",
" <td>Shooter</td>\n",
" <td>Infogrames</td>\n",
" <td>0.01</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16595</th>\n",
" <td>16598</td>\n",
" <td>SCORE International Baja 1000: The Official Game</td>\n",
" <td>PS2</td>\n",
" <td>2008.0</td>\n",
" <td>Racing</td>\n",
" <td>Activision</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16596</th>\n",
" <td>16599</td>\n",
" <td>Know How 2</td>\n",
" <td>DS</td>\n",
" <td>2010.0</td>\n",
" <td>Puzzle</td>\n",
" <td>7G//AMES</td>\n",
" <td>0.00</td>\n",
" <td>0.01</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16597</th>\n",
" <td>16600</td>\n",
" <td>Spirits &amp; Spells</td>\n",
" <td>GBA</td>\n",
" <td>2003.0</td>\n",
" <td>Platform</td>\n",
" <td>Wanadoo</td>\n",
" <td>0.01</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.00</td>\n",
" <td>0.01</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>16598 rows × 11 columns</p>\n",
"</div>"
],
"text/plain": [
" Rank Name Platform \\\n",
"0 1 Wii Sports Wii \n",
"1 2 Super Mario Bros. NES \n",
"2 3 Mario Kart Wii Wii \n",
"3 4 Wii Sports Resort Wii \n",
"4 5 Pokemon Red/Pokemon Blue GB \n",
"... ... ... ... \n",
"16593 16596 Woody Woodpecker in Crazy Castle 5 GBA \n",
"16594 16597 Men in Black II: Alien Escape GC \n",
"16595 16598 SCORE International Baja 1000: The Official Game PS2 \n",
"16596 16599 Know How 2 DS \n",
"16597 16600 Spirits & Spells GBA \n",
"\n",
" Year Genre Publisher NA_Sales EU_Sales JP_Sales \\\n",
"0 2006.0 Sports Nintendo 41.49 29.02 3.77 \n",
"1 1985.0 Platform Nintendo 29.08 3.58 6.81 \n",
"2 2008.0 Racing Nintendo 15.85 12.88 3.79 \n",
"3 2009.0 Sports Nintendo 15.75 11.01 3.28 \n",
"4 1996.0 Role-Playing Nintendo 11.27 8.89 10.22 \n",
"... ... ... ... ... ... ... \n",
"16593 2002.0 Platform Kemco 0.01 0.00 0.00 \n",
"16594 2003.0 Shooter Infogrames 0.01 0.00 0.00 \n",
"16595 2008.0 Racing Activision 0.00 0.00 0.00 \n",
"16596 2010.0 Puzzle 7G//AMES 0.00 0.01 0.00 \n",
"16597 2003.0 Platform Wanadoo 0.01 0.00 0.00 \n",
"\n",
" Other_Sales Global_Sales \n",
"0 8.46 82.74 \n",
"1 0.77 40.24 \n",
"2 3.31 35.82 \n",
"3 2.96 33.00 \n",
"4 1.00 31.37 \n",
"... ... ... \n",
"16593 0.00 0.01 \n",
"16594 0.00 0.01 \n",
"16595 0.00 0.01 \n",
"16596 0.00 0.01 \n",
"16597 0.00 0.01 \n",
"\n",
"[16598 rows x 11 columns]"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pandas as pd\n",
"vgsales = pd.read_csv('vgsales.csv')\n",
"vgsales"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 484
},
"id": "Ymp2F4Cdj9XP",
"outputId": "9096c32c-1392-4817-fdd8-035dc4a0176a"
},
"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>Name</th>\n",
" <th>Platform</th>\n",
" <th>Year</th>\n",
" <th>Genre</th>\n",
" <th>Publisher</th>\n",
" <th>NA_Sales</th>\n",
" <th>EU_Sales</th>\n",
" <th>JP_Sales</th>\n",
" <th>Other_Sales</th>\n",
" <th>Global_Sales</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>count</th>\n",
" <td>16598.000000</td>\n",
" <td>16598</td>\n",
" <td>16598</td>\n",
" <td>16327.000000</td>\n",
" <td>16598</td>\n",
" <td>16540</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" <td>16598.000000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>unique</th>\n",
" <td>NaN</td>\n",
" <td>11493</td>\n",
" <td>31</td>\n",
" <td>NaN</td>\n",
" <td>12</td>\n",
" <td>578</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>top</th>\n",
" <td>NaN</td>\n",
" <td>Need for Speed: Most Wanted</td>\n",
" <td>DS</td>\n",
" <td>NaN</td>\n",
" <td>Action</td>\n",
" <td>Electronic Arts</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>freq</th>\n",
" <td>NaN</td>\n",
" <td>12</td>\n",
" <td>2163</td>\n",
" <td>NaN</td>\n",
" <td>3316</td>\n",
" <td>1351</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" </tr>\n",
" <tr>\n",
" <th>mean</th>\n",
" <td>8300.605254</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2006.406443</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.264667</td>\n",
" <td>0.146652</td>\n",
" <td>0.077782</td>\n",
" <td>0.048063</td>\n",
" <td>0.537441</td>\n",
" </tr>\n",
" <tr>\n",
" <th>std</th>\n",
" <td>4791.853933</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>5.828981</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.816683</td>\n",
" <td>0.505351</td>\n",
" <td>0.309291</td>\n",
" <td>0.188588</td>\n",
" <td>1.555028</td>\n",
" </tr>\n",
" <tr>\n",
" <th>min</th>\n",
" <td>1.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>1980.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.010000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25%</th>\n",
" <td>4151.250000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2003.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>0.060000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>50%</th>\n",
" <td>8300.500000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2007.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.080000</td>\n",
" <td>0.020000</td>\n",
" <td>0.000000</td>\n",
" <td>0.010000</td>\n",
" <td>0.170000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>75%</th>\n",
" <td>12449.750000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2010.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>0.240000</td>\n",
" <td>0.110000</td>\n",
" <td>0.040000</td>\n",
" <td>0.040000</td>\n",
" <td>0.470000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>max</th>\n",
" <td>16600.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>2020.000000</td>\n",
" <td>NaN</td>\n",
" <td>NaN</td>\n",
" <td>41.490000</td>\n",
" <td>29.020000</td>\n",
" <td>10.220000</td>\n",
" <td>10.570000</td>\n",
" <td>82.740000</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Rank Name Platform Year \\\n",
"count 16598.000000 16598 16598 16327.000000 \n",
"unique NaN 11493 31 NaN \n",
"top NaN Need for Speed: Most Wanted DS NaN \n",
"freq NaN 12 2163 NaN \n",
"mean 8300.605254 NaN NaN 2006.406443 \n",
"std 4791.853933 NaN NaN 5.828981 \n",
"min 1.000000 NaN NaN 1980.000000 \n",
"25% 4151.250000 NaN NaN 2003.000000 \n",
"50% 8300.500000 NaN NaN 2007.000000 \n",
"75% 12449.750000 NaN NaN 2010.000000 \n",
"max 16600.000000 NaN NaN 2020.000000 \n",
"\n",
" Genre Publisher NA_Sales EU_Sales JP_Sales \\\n",
"count 16598 16540 16598.000000 16598.000000 16598.000000 \n",
"unique 12 578 NaN NaN NaN \n",
"top Action Electronic Arts NaN NaN NaN \n",
"freq 3316 1351 NaN NaN NaN \n",
"mean NaN NaN 0.264667 0.146652 0.077782 \n",
"std NaN NaN 0.816683 0.505351 0.309291 \n",
"min NaN NaN 0.000000 0.000000 0.000000 \n",
"25% NaN NaN 0.000000 0.000000 0.000000 \n",
"50% NaN NaN 0.080000 0.020000 0.000000 \n",
"75% NaN NaN 0.240000 0.110000 0.040000 \n",
"max NaN NaN 41.490000 29.020000 10.220000 \n",
"\n",
" Other_Sales Global_Sales \n",
"count 16598.000000 16598.000000 \n",
"unique NaN NaN \n",
"top NaN NaN \n",
"freq NaN NaN \n",
"mean 0.048063 0.537441 \n",
"std 0.188588 1.555028 \n",
"min 0.000000 0.010000 \n",
"25% 0.000000 0.060000 \n",
"50% 0.010000 0.170000 \n",
"75% 0.040000 0.470000 \n",
"max 10.570000 82.740000 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vgsales.describe(include='all')"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "U9B1rGuPkXYe",
"outputId": "36c46aa5-b84d-49ba-f00b-bbcdae4d5efb"
},
"outputs": [
{
"data": {
"text/plain": [
"Electronic Arts 1351\n",
"Activision 975\n",
"Namco Bandai Games 932\n",
"Ubisoft 921\n",
"Konami Digital Entertainment 832\n",
" ... \n",
"Phantagram 1\n",
"989 Sports 1\n",
"Illusion Softworks 1\n",
"TYO 1\n",
"General Entertainment 1\n",
"Name: Publisher, Length: 578, dtype: int64"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vgsales[\"Publisher\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "fOODoGBDuNVN",
"outputId": "88220e61-99a8-4d7a-fc84-91601c4844e4"
},
"outputs": [
{
"data": {
"text/plain": [
"DS 2163\n",
"PS2 2161\n",
"PS3 1329\n",
"Wii 1325\n",
"X360 1265\n",
"PSP 1213\n",
"PS 1196\n",
"PC 960\n",
"XB 824\n",
"GBA 822\n",
"GC 556\n",
"3DS 509\n",
"PSV 413\n",
"PS4 336\n",
"N64 319\n",
"SNES 239\n",
"XOne 213\n",
"SAT 173\n",
"WiiU 143\n",
"2600 133\n",
"NES 98\n",
"GB 98\n",
"DC 52\n",
"GEN 27\n",
"NG 12\n",
"SCD 6\n",
"WS 6\n",
"3DO 3\n",
"TG16 2\n",
"GG 1\n",
"PCFX 1\n",
"Name: Platform, dtype: int64"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vgsales[\"Platform\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 299
},
"id": "rjfY8oCdlw19",
"outputId": "c16b5900-3c45-4ab4-c892-5b0be7bbdd7d"
},
"outputs": [
{
"data": {
"text/plain": [
"<AxesSubplot:>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEJCAYAAAB4yveGAAAAOXRFWHRTb2Z0d2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iIUkbAtdJ+m1xYkREviDUli8c5wJMmjSpo++amVnvBlS9ExEP5b+PA5cBOwGPtapt8t/Hc/aHgE0LX98kp5mZ2TDpd9CXtIaktVrDwF7APcAVwIE524HA5Xn4CmBK7sWzC/BUoRrIzMyGwUCqd8YBl0lqzefiiLha0izgUkkfBRYC7835rwLeBswHngUOGsCyzcysH/od9CPiAeA1FelPAntWpAcwrb/LMzOzgfMTuWZmDeKgb2bWIA76ZmYN4rds2nLFD3KZDYxL+mZmDeKgb2bWIA76ZmYN4qBvZtYgDvpmZg3ioG9m1iDusmkrLHfvNOvJJX0zswZxSd8ar+qOAHxXYCsml/TNzBrEQd/MrEEc9M3MGsRB38ysQRz0zcwaxEHfzKxB3GXTrAPu3mnLO5f0zcwaxEHfzKxBXL1jNkT87h9bFrmkb2bWIA76ZmYN4qBvZtYgrtM3Wwa4/t+Gi0v6ZmYN4qBvZtYgrt4xW864KsgGwkHfbAXlV0ZYFVfvmJk1iIO+mVmDuHrHzDqqCnKbwvLNJX0zswZx0DczaxAHfTOzBnGdvpkNGdf/L3tc0jcza5BhD/qSJku6X9J8SUcN9/LNzJpsWKt3JI0CzgTeCiwCZkm6IiLmDud6mNmyx1VBw2O46/R3AuZHxAMAki4B9gUc9M2sFr9eYmAUEcO3MOkAYHJEHJzHPwLsHBGHFvJMBabm0X8B7q+Y1QbAEzUXWzfvUMxzWcg70ssfqrwjvfyhyjvSyx+qvCO9/KH
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"vgsales[\"Platform\"].value_counts().plot(kind=\"bar\")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 313
},
"id": "FrKOc5OxvicT",
"outputId": "04d5fe12-92e8-4e72-cb36-adbdbbb230d3"
},
"outputs": [
{
"data": {
"text/plain": [
"<AxesSubplot:xlabel='Platform'>"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAEXCAYAAAC9A7+nAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAnaElEQVR4nO3deZgcVbnH8e+bhQxriBDWSZxAohAIJmEMS7wYAt6bgJcoohIVBAVEg7IpREFQFkHEeFkVVAyiAhEFgoRFw6KiIQkhTBZEArIMawgqmyEE3vvHOZ2pqameqZ7pSU8qv8/z9DNdVadPna6ueevUqVOnzN0REZF1X69aF0BERKpDAV1EpCAU0EVECkIBXUSkIBTQRUQKQgFdRKQg+tRqxVtuuaU3NDTUavUiIuukBx544CV3H5i1rGYBvaGhgfnz59dq9SIi6yQze7LcMjW5iIgUhAK6iEhBKKCLiBREzdrQRWT98tZbb9Hc3MzKlStrXZR1Ql1dHfX19fTt2zf3ZxTQRWStaG5uZtNNN6WhoQEzq3VxejR3Z8WKFTQ3NzNkyJDcn1OTi4isFStXrmSLLbZQMM/BzNhiiy0qPpvpMKCb2VVm9qKZLS6z3MzsYjNbZmZNZja6ohKIyHpDwTy/zmyrPDX06cCEdpZPBIbF1zHADysuhYiIdFmHbeju/kcza2gnySTg5x6elDHHzDY3s23d/blqFVLWXQ1Tb20z74nzD6xBSaSnydo3uiLvfrXJJpuwePFidt55Z9773veyatUq9tlnHy6//HJ69Wpbx33nnXc44YQTuOuuuzAz6urqmDFjRrtt2+PGjePCCy+ksbGx09+nM6pxUXR74OnEdHOcp4AuIj3WjjvuyMKFC1m9ejXjx4/npptu4uCDD26T7vrrr+fZZ5+lqamJXr160dzczMYbb1yDEndsrV4UNbNjzGy+mc1fvnz52ly1iEimPn36sPfee7Ns2bLM5c899xzbbrvtmtp7fX09AwYMAOCLX/wijY2N7LLLLpx55pmZn7/zzjvZa6+9GD16NB//+Md57bXXAJg6dSrDhw9nt91246tf/WpVvks1AvozwKDEdH2c14a7X+nuje7eOHBg5tgyIiJr1RtvvMHs2bMZMWJE5vJPfOIT3HLLLYwcOZKTTz6ZBx98cM2yc889l/nz59PU1MS9995LU1NTq8++9NJLnHPOOfzhD39gwYIFNDY2Mm3aNFasWMGNN97IkiVLaGpq4vTTT6/Kd6lGQJ8JHB57u+wJ/Fvt5yLS0z322GOMHDmSsWPHcuCBBzJx4sTMdPX19TzyyCOcd9559OrVi/3224/Zs2cDMGPGDEaPHs2oUaNYsmQJS5cubfXZOXPmsHTpUsaOHcvIkSO5+uqrefLJJ+nfvz91dXV8/vOf57e//S0bbbRRVb5Th23oZnYtMA7Y0syagTOBvgDu/iNgFnAAsAx4AziyKiUTEelGpTb0PPr168fEiROZOHEiW2+9NTfddBM77LADF154IfPmzWPAgAEcccQRbfqNuzsf+tCHuPbaa9vkOXfuXGbPns0NN9zApZdeyl133dXl75Snl8vkDpY7MKXLJRER6YEWLFjANttsw3bbbcc777xDU1MTu+22G6+88gobb7wx/fv354UXXuC2225j3LhxrT675557MmXKFJYtW8bQoUN5/fXXeeaZZ9huu+144403OOCAAxg7diw77LBDVcqqW/9FpCZq0X119erV9OvXr6LPvPjiixx99NG8+eabAIwZM4bjjjuOuro6Ro0axU477cSgQYMYO3Zsm88OHDiQ6dOnM3ny5DWfP+ecc9h0002ZNGkSK1euxN2ZNm1a178cCugish5ZsmQJO+64Iw0NDSxenHnzexsTJkxgwoTseyunT5+eOf+ee+5Z8378+PHMmzevTZq5c+fmWn8lNJaLiKwXfvSjHzF58mTOOeecWhel26iGLiLrhWOPPZZjjz227PJFixZx2GGHtZrXr18/7r///u4uWtUooIuIACNGjMjd66WnUpOLiKw1oVOc5NGZbaWALiJrRV1dHStWrFBQz6H0gIu6urqKPqcmFxFZK+rr62lubkbjOOVTegRdJRTQRWSt6Nu3b0WPU5PKqclFRKQgFNBFRApCAV1EpCAU0EVECkIBXUSkIBTQRUQKQgFdRKQgFNBFRApCAV1EpC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ZlsSmmAer14xRUSkIx0GdHdfDRwH3AE8DMxw9yVmdpaZHRST3QGsMLOlwN3A19x9RXcVWkRE2srVhu7us4BZqXlnJN47cFJ8iYhIDehOURGRglBAFxEpCAV0EZGCUEAXESkIBXQRkYJQQBcRKQgFdBGRglBAFxEpCAV0EZGCUEAXESkIBXQRkYJQQBcRKQgFdBGRglBAFxEpCAV0EZGCUEAXESkIBXQRkYJQQBcRKYhcj6ATEemshqm3Zs5/4vwD13JJik81dBGRglBAFxEpCAV0EZGCUEAXESkIBXQRkYJQQBcRKQgFdBGRglBAFxEpCAV0EZGCUEAXESkIBXQRkYJQQBcRKQgFdBGRgsgV0M1sgpk9YmbLzGxqO+k+ZmZuZo3VK6KIiOTRYUA3s97AZcBEYDgw2cyGZ6TbFDgeuL/ahRQRkY7lqaGPAZa5++Puvgq4DpiUke5s4LvAyiqWT0REcsoT0LcHnk5MN8d5a5jZaGCQu2ePZC8iIt2uyxdFzawXMA04OUfaY8xsvpnNX758eVdXLSIiCXkC+jPAoMR0fZxXsimwK3CPmT0B7AnMzLow6u5XunujuzcOHDiw86UWEZE28gT0ecAwMxtiZhsAhwIzSwvd/d/uvqW7N7h7AzAHOMjd53dLiUVEJFOHAd3dVwPHAXcADwMz3H2JmZ1lZgd1dwFFRCSfPnkSufssYFZq3hll0o7rerFERKRSulNURKQgFNBFRApCAV1EpCAU0EVECkIBXUSkIBTQRUQKQgFdRKQgFNBFRApCAV1EpCAU0EVECkIBXUSkIBTQRUQKQgF
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"vgsales[[\"Platform\",\"JP_Sales\"]].groupby(\"Platform\").mean().plot(kind=\"bar\")"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 399
},
"id": "t-3fmcjiv9Cd",
"outputId": "ab2be9c6-2cab-4e9c-d2c5-60e672137d92"
},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x7f432bf95e80>"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAdUAAAFtCAYAAABRIPDvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuNCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8QVMy6AAAACXBIWXMAAAsTAAALEwEAmpwYAACHCklEQVR4nOzdd3hUVfrA8e+9d3omvUOAhBZ6L9KUotIJxYIFe0XFhiLqz4KoC3ZURHd13VVWFAERECwgoAIB6b2GkpBCepk+9/7+iAzEUBKYkIScz/PsPsyZW85J4rxzyj2vpGmahiAIgiAIF02u7goIgiAIwuVCBFVBEARB8BMRVAVBEATBT0RQFQRBEAQ/EUFVEARBEPxEBFVBEARB8BNddVfAH3JyilHVyj0ZFBpqIS/PVkU1qj6Xa7tAtK22Em2ruMjIQL9dS6gedbanqtMp1V2FKnG5tgtE22or0TahLqmzQVUQBEEQ/E0EVUEQBEHwExFUBUEQBMFPRFAVBEEQBD8RQVUQBEEQ/EQEVUEQBEHwExFUBUEQBMFPRFAVBEEQBD8RQVWoURRFRlHEn6UgCLXTZbFNoVD7KWgE5OTApt0gS9CpFcVhYVRy90lBEIRqJYKqUCMEZGej/etbOBlEN+zAet8NFIaFVWu9BEEQKkOMswnVTqdIsHbrqYAKoGmwdbcYChYEoVYRn1hCDSBxxnFeMfYrCEItI4KqUO08XhV6tC9bKAEdW+L1qtVSJ0EQhAsh5lSFGqEkMpKAe8bAum2gyNC9HSViPlUQhFpGBFWhRvBKEoWRUehGXQuAxyN6qIIg1D4iqAo1igimgiDUZmJOVRAEQRD8RARVQRAEQfCTSx5UP/jgAxITE9m3bx8AW7ZsYcSIEQwcOJC77rqLnJycS10lQRAEQfCLSxpUd+7cyZYtW6hfvz4Aqqry1FNP8cILL/Djjz/SpUsX3nzzzUtZJUEQBEHwm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QYOwWq1IkkSrVq146623MBgMuFwupk2bRt++fenZsycvvPACDocDgOTkZK688ko+++wzevToQe/evZk3b57v+s888wwvvvgi9957Lx06dCA5OZnMzEweeeQRrrjiCvr3789///vf6mp+pYmgKgiCIJzV5s2bcblcDBgw4KzHvPnmm6SkpPDdd9/x008/kZWVxYcffuh7Pzs7m6KiIlavXs2rr77KlClTKCgo8L2/ePFiHnjgATZt2kTHjh158MEHSUxMZPXq1fznP//hP//5D7/99luVttNfRFAVBEEQziovL4/Q0FB0ulNLcMaOHUuXLl1o164d69ev55tvvuHZZ58lJCQEq9XK/fffz5IlS3zH63Q6HnroIfR6PVdddRUWi4WUlBTf+wMGDKBz587Issy+ffvIzc3l4YcfxmAw0KBBA2644QZ++OGHS9ruCyUWKgmCIAhnFRISQl5eHh6PxxdY58yZA8CVV15JdnY2drud0aNH+87RNA1VVctc4/SgbDabsdlsvtexsbG+f6elpZGVlUWXLl18ZV6vt8zrmkwEVUEQBOGsOnbsiMFgYPny5QwcOLDc+6GhoZhMJpYsWUJ0dPRF3y82Npa4uDh++umni75WdRDDv4IgCMJZBQUF8dBDD/Hyyy+zbNkyiouLUVWV3bt3Y7fbkWWZ66+/ntdee42cnBwAMjMzL3gOtF27dgQEBPDJJ5/gcDjwer3s27ePbdu2+bNZVUb0VAVBEIRzuvfee4mOjuZf//oXkyZNwmw206BBAyZOnEjHjh3p0KEDH374ITfccAN5eXlER0dz00030adPn0rfS1EUZs2axbRp0xgwYAAul4uEhAQee+wx/zesCkiapmnVXYmLlZNTjKpWrhmRkYGcOFFURTWqPpdru0C0rbYSbavc9YTaTQz/CoIgCIKfiKAqCIIgCH4igqogCIIg+MklW6g0fvx4UlNTkWUZi8XC//3f/9GyZUtSUlJ45plnyM/PJyQkhGnTphEfH3+pqiUIgiAIfnPJguq0adMIDCydhP/ll1949tlnWbBgAS+++CI333wzSUlJLFy4kBdeeKFW7fMoCIIgCCddsuHfkwEVoLi4GEmSyMnJYdeuXQwbNgyAYcOGsWvXLnJzcy9VtQRBEATBby7pc6rPPfccf/zxB5qm8a9//Yv09HSio6NRFAUofT4pKiqK9PR0wsLCKnzd8HDrBdXncl2+frm2C0TbaivRNqGuuKRB9dVXXwXgu+++Y/r06Tz66KN+ua54TvWUy7VdINpWW4m2Ve56Qu1WLat/R44cSXJyMjExMWRmZvqS0nq9XrKysspsriwIgiBUn6VLlzJy5EiSkpIYNGgQTz75pF+v/8svv9SaLQgr4pL0VEtKSigsLPQFyxUrVhAcHEx4eDgtW7Zk8eLFJCUlsXjxYlq2bFmpoV9BEMqTJRWjIxPcNtSAaJzShU2RCLWDZ+MuPD+shrxCCA1CN+RKdJ1bXfR1s7KyePnll1mwYAGxsbFomsbu3bv9UONSXq+XX375hTZt2tCuXTu/Xbc6XZKgarfbefTRR32bLwcHBzNr1iwkSeKll17imWeeYebMmQQFBTFt2rRLUSVBuGzpNAfy3sUUrZ4FqgclPJ6A4VOxGeOqu2pCFfBs3IXnm2Xg9pQW5BWWvoaLDqzZ2dnodDpCQkIAkCSJVq1Kr5mYmMhDDz3E8uXLcTgcPPHEE74sNqtXr+btt9/G6/USFhbGlClTaNSoEcnJyUydOpU2bdqwa9cuHnnkEVasWMGaNWuYO3cud955J+3atWPy5MnY7XZUVWXUqFHcfffdF9WOS+mSBNWIiAi++eabM77XpEkT5s6deymqIQh1gr4whaKVH/hee3MO41j1PvprX8GNoRprJlQFzw+rTwXUk9wePD+svuig2qJFC9q1a0ffvn3p3r07nTp1IikpidDQUABkWWbhwoUcOnSIm266yZfz9Omnn+bLL7+kadOmzJ07l4kTJ/o+5w8cOMCUKVPo2LEjgK+
"text/plain": [
"<Figure size 467.6x360 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import seaborn as sns\n",
"sns.set_theme()\n",
"sns.relplot(data=vgsales, x=\"JP_Sales\", y=\"NA_Sales\", hue=\"Genre\")"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "3dKPNi2loZvE",
"outputId": "ef08ce5e-9c4c-49b0-90ff-7bf74f578339"
},
"outputs": [
{
"data": {
"text/plain": [
"PS2 873\n",
"DS 829\n",
"Wii 530\n",
"X360 507\n",
"PSP 503\n",
"PS3 488\n",
"PS 471\n",
"PC 396\n",
"XB 339\n",
"GBA 337\n",
"GC 237\n",
"3DS 205\n",
"PSV 166\n",
"PS4 143\n",
"N64 126\n",
"XOne 95\n",
"SNES 95\n",
"SAT 65\n",
"WiiU 55\n",
"2600 49\n",
"NES 43\n",
"GB 38\n",
"DC 25\n",
"GEN 10\n",
"NG 8\n",
"3DO 2\n",
"WS 2\n",
"GG 1\n",
"SCD 1\n",
"Name: Platform, dtype: int64"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from sklearn.model_selection import train_test_split\n",
"vgsales_train, vgsales_test = train_test_split(vgsales, test_size = 0.6, random_state = 1)\n",
"vgsales_train[\"Platform\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "O0aSynxruXwH",
"outputId": "2512716a-4909-4a49-cf58-c74ae4433f8b"
},
"outputs": [
{
"data": {
"text/plain": [
"DS 1334\n",
"PS2 1288\n",
"PS3 841\n",
"Wii 795\n",
"X360 758\n",
"PS 725\n",
"PSP 710\n",
"PC 564\n",
"XB 485\n",
"GBA 485\n",
"GC 319\n",
"3DS 304\n",
"PSV 247\n",
"PS4 193\n",
"N64 193\n",
"SNES 144\n",
"XOne 118\n",
"SAT 108\n",
"WiiU 88\n",
"2600 84\n",
"GB 60\n",
"NES 55\n",
"DC 27\n",
"GEN 17\n",
"SCD 5\n",
"NG 4\n",
"WS 4\n",
"TG16 2\n",
"3DO 1\n",
"PCFX 1\n",
"Name: Platform, dtype: int64"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vgsales_test[\"Platform\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"colab": {
"collapsed_sections": [],
"name": "Zadanie1.ipynb",
"provenance": []
},
"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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 1
}