ium_487194/ium_lab2.ipynb

1466 lines
132 KiB
Plaintext
Raw Normal View History

2023-03-21 22:38:55 +01:00
{
"cells": [
{
"cell_type": "code",
"execution_count": 36,
"id": "ed58a8f0",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: kaggle in /home/witek/.local/lib/python3.10/site-packages (1.5.13)\n",
"Requirement already satisfied: python-slugify in /home/witek/.local/lib/python3.10/site-packages (from kaggle) (8.0.1)\n",
"Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from kaggle) (2.25.1)\n",
"Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from kaggle) (2020.6.20)\n",
"Requirement already satisfied: six>=1.10 in /usr/lib/python3/dist-packages (from kaggle) (1.16.0)\n",
"Requirement already satisfied: python-dateutil in /home/witek/.local/lib/python3.10/site-packages (from kaggle) (2.8.2)\n",
"Requirement already satisfied: urllib3 in /usr/lib/python3/dist-packages (from kaggle) (1.26.5)\n",
"Requirement already satisfied: tqdm in /home/witek/.local/lib/python3.10/site-packages (from kaggle) (4.65.0)\n",
"Requirement already satisfied: text-unidecode>=1.3 in /home/witek/.local/lib/python3.10/site-packages (from python-slugify->kaggle) (1.3)\n",
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: pandas in /home/witek/.local/lib/python3.10/site-packages (1.5.3)\n",
"Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas) (2022.1)\n",
"Requirement already satisfied: python-dateutil>=2.8.1 in /home/witek/.local/lib/python3.10/site-packages (from pandas) (2.8.2)\n",
"Requirement already satisfied: numpy>=1.21.0 in /home/witek/.local/lib/python3.10/site-packages (from pandas) (1.24.2)\n",
"Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.8.1->pandas) (1.16.0)\n",
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: unzip in /home/witek/.local/lib/python3.10/site-packages (1.0.0)\n",
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: scikit-learn in /home/witek/.local/lib/python3.10/site-packages (1.2.2)\n",
"Requirement already satisfied: joblib>=1.1.1 in /home/witek/.local/lib/python3.10/site-packages (from scikit-learn) (1.2.0)\n",
"Requirement already satisfied: scipy>=1.3.2 in /home/witek/.local/lib/python3.10/site-packages (from scikit-learn) (1.10.1)\n",
"Requirement already satisfied: numpy>=1.17.3 in /home/witek/.local/lib/python3.10/site-packages (from scikit-learn) (1.24.2)\n",
"Requirement already satisfied: threadpoolctl>=2.0.0 in /home/witek/.local/lib/python3.10/site-packages (from scikit-learn) (3.1.0)\n",
"Defaulting to user installation because normal site-packages is not writeable\n",
"Requirement already satisfied: seaborn in /home/witek/.local/lib/python3.10/site-packages (0.12.2)\n",
"Requirement already satisfied: pandas>=0.25 in /home/witek/.local/lib/python3.10/site-packages (from seaborn) (1.5.3)\n",
"Requirement already satisfied: matplotlib!=3.6.1,>=3.1 in /home/witek/.local/lib/python3.10/site-packages (from seaborn) (3.7.1)\n",
"Requirement already satisfied: numpy!=1.24.0,>=1.17 in /home/witek/.local/lib/python3.10/site-packages (from seaborn) (1.24.2)\n",
"Requirement already satisfied: contourpy>=1.0.1 in /home/witek/.local/lib/python3.10/site-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (1.0.7)\n",
"Requirement already satisfied: kiwisolver>=1.0.1 in /home/witek/.local/lib/python3.10/site-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (1.4.4)\n",
"Requirement already satisfied: pyparsing>=2.3.1 in /usr/lib/python3/dist-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (2.4.7)\n",
"Requirement already satisfied: cycler>=0.10 in /home/witek/.local/lib/python3.10/site-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (0.11.0)\n",
"Requirement already satisfied: python-dateutil>=2.7 in /home/witek/.local/lib/python3.10/site-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (2.8.2)\n",
"Requirement already satisfied: pillow>=6.2.0 in /usr/lib/python3/dist-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (9.0.1)\n",
"Requirement already satisfied: packaging>=20.0 in /home/witek/.local/lib/python3.10/site-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (23.0)\n",
"Requirement already satisfied: fonttools>=4.22.0 in /home/witek/.local/lib/python3.10/site-packages (from matplotlib!=3.6.1,>=3.1->seaborn) (4.39.2)\n",
"Requirement already satisfied: pytz>=2020.1 in /usr/lib/python3/dist-packages (from pandas>=0.25->seaborn) (2022.1)\n",
"Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil>=2.7->matplotlib!=3.6.1,>=3.1->seaborn) (1.16.0)\n"
]
}
],
"source": [
"#Pobieranie odpowiednich bibliotek\n",
"!pip install kaggle\n",
"!pip install pandas\n",
"!pip install unzip\n",
"!pip install scikit-learn\n",
"!pip install seaborn"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "79101aff",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Warning: Your Kaggle API key is readable by other users on this system! To fix this, you can run 'chmod 600 /home/witek/.kaggle/kaggle.json'\n",
"Downloading bike-sales-in-europe.zip to /home/witek/python-ws\n",
" 0%| | 0.00/1.15M [00:00<?, ?B/s]\n",
"100%|██████████████████████████████████████| 1.15M/1.15M [00:00<00:00, 18.2MB/s]\n"
]
}
],
"source": [
"!kaggle datasets download -d sadiqshah/bike-sales-in-europe\n"
]
},
{
"cell_type": "code",
"execution_count": 41,
"id": "82f1ce24",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Archive: bike-sales-in-europe.zip\n",
" inflating: Sales.csv \n"
]
}
],
"source": [
"!unzip -o bike-sales-in-europe.zip\n"
]
},
{
"cell_type": "code",
"execution_count": 61,
"id": "f547e6a3",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import seaborn as sns"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "e6a01b12",
"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>Date</th>\n",
" <th>Day</th>\n",
" <th>Month</th>\n",
" <th>Year</th>\n",
" <th>Customer_Age</th>\n",
" <th>Age_Group</th>\n",
" <th>Customer_Gender</th>\n",
" <th>Country</th>\n",
" <th>State</th>\n",
" <th>Product_Category</th>\n",
" <th>Sub_Category</th>\n",
" <th>Product</th>\n",
" <th>Order_Quantity</th>\n",
" <th>Unit_Cost</th>\n",
" <th>Unit_Price</th>\n",
" <th>Profit</th>\n",
" <th>Cost</th>\n",
" <th>Revenue</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>2013-11-26</td>\n",
" <td>26</td>\n",
" <td>November</td>\n",
" <td>2013</td>\n",
" <td>19</td>\n",
" <td>Youth (&lt;25)</td>\n",
" <td>M</td>\n",
" <td>Canada</td>\n",
" <td>British Columbia</td>\n",
" <td>Accessories</td>\n",
" <td>Bike Racks</td>\n",
" <td>Hitch Rack - 4-Bike</td>\n",
" <td>8</td>\n",
" <td>45</td>\n",
" <td>120</td>\n",
" <td>590</td>\n",
" <td>360</td>\n",
" <td>950</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>2015-11-26</td>\n",
" <td>26</td>\n",
" <td>November</td>\n",
" <td>2015</td>\n",
" <td>19</td>\n",
" <td>Youth (&lt;25)</td>\n",
" <td>M</td>\n",
" <td>Canada</td>\n",
" <td>British Columbia</td>\n",
" <td>Accessories</td>\n",
" <td>Bike Racks</td>\n",
" <td>Hitch Rack - 4-Bike</td>\n",
" <td>8</td>\n",
" <td>45</td>\n",
" <td>120</td>\n",
" <td>590</td>\n",
" <td>360</td>\n",
" <td>950</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2014-03-23</td>\n",
" <td>23</td>\n",
" <td>March</td>\n",
" <td>2014</td>\n",
" <td>49</td>\n",
" <td>Adults (35-64)</td>\n",
" <td>M</td>\n",
" <td>Australia</td>\n",
" <td>New South Wales</td>\n",
" <td>Accessories</td>\n",
" <td>Bike Racks</td>\n",
" <td>Hitch Rack - 4-Bike</td>\n",
" <td>23</td>\n",
" <td>45</td>\n",
" <td>120</td>\n",
" <td>1366</td>\n",
" <td>1035</td>\n",
" <td>2401</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>2016-03-23</td>\n",
" <td>23</td>\n",
" <td>March</td>\n",
" <td>2016</td>\n",
" <td>49</td>\n",
" <td>Adults (35-64)</td>\n",
" <td>M</td>\n",
" <td>Australia</td>\n",
" <td>New South Wales</td>\n",
" <td>Accessories</td>\n",
" <td>Bike Racks</td>\n",
" <td>Hitch Rack - 4-Bike</td>\n",
" <td>20</td>\n",
" <td>45</td>\n",
" <td>120</td>\n",
" <td>1188</td>\n",
" <td>900</td>\n",
" <td>2088</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>2014-05-15</td>\n",
" <td>15</td>\n",
" <td>May</td>\n",
" <td>2014</td>\n",
" <td>47</td>\n",
" <td>Adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>Australia</td>\n",
" <td>New South Wales</td>\n",
" <td>Accessories</td>\n",
" <td>Bike Racks</td>\n",
" <td>Hitch Rack - 4-Bike</td>\n",
" <td>4</td>\n",
" <td>45</td>\n",
" <td>120</td>\n",
" <td>238</td>\n",
" <td>180</td>\n",
" <td>418</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",
" </tr>\n",
" <tr>\n",
" <th>113031</th>\n",
" <td>2016-04-12</td>\n",
" <td>12</td>\n",
" <td>April</td>\n",
" <td>2016</td>\n",
" <td>41</td>\n",
" <td>Adults (35-64)</td>\n",
" <td>M</td>\n",
" <td>United Kingdom</td>\n",
" <td>England</td>\n",
" <td>Clothing</td>\n",
" <td>Vests</td>\n",
" <td>Classic Vest, S</td>\n",
" <td>3</td>\n",
" <td>24</td>\n",
" <td>64</td>\n",
" <td>112</td>\n",
" <td>72</td>\n",
" <td>184</td>\n",
" </tr>\n",
" <tr>\n",
" <th>113032</th>\n",
" <td>2014-04-02</td>\n",
" <td>2</td>\n",
" <td>April</td>\n",
" <td>2014</td>\n",
" <td>18</td>\n",
" <td>Youth (&lt;25)</td>\n",
" <td>M</td>\n",
" <td>Australia</td>\n",
" <td>Queensland</td>\n",
" <td>Clothing</td>\n",
" <td>Vests</td>\n",
" <td>Classic Vest, M</td>\n",
" <td>22</td>\n",
" <td>24</td>\n",
" <td>64</td>\n",
" <td>655</td>\n",
" <td>528</td>\n",
" <td>1183</td>\n",
" </tr>\n",
" <tr>\n",
" <th>113033</th>\n",
" <td>2016-04-02</td>\n",
" <td>2</td>\n",
" <td>April</td>\n",
" <td>2016</td>\n",
" <td>18</td>\n",
" <td>Youth (&lt;25)</td>\n",
" <td>M</td>\n",
" <td>Australia</td>\n",
" <td>Queensland</td>\n",
" <td>Clothing</td>\n",
" <td>Vests</td>\n",
" <td>Classic Vest, M</td>\n",
" <td>22</td>\n",
" <td>24</td>\n",
" <td>64</td>\n",
" <td>655</td>\n",
" <td>528</td>\n",
" <td>1183</td>\n",
" </tr>\n",
" <tr>\n",
" <th>113034</th>\n",
" <td>2014-03-04</td>\n",
" <td>4</td>\n",
" <td>March</td>\n",
" <td>2014</td>\n",
" <td>37</td>\n",
" <td>Adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>France</td>\n",
" <td>Seine (Paris)</td>\n",
" <td>Clothing</td>\n",
" <td>Vests</td>\n",
" <td>Classic Vest, L</td>\n",
" <td>24</td>\n",
" <td>24</td>\n",
" <td>64</td>\n",
" <td>684</td>\n",
" <td>576</td>\n",
" <td>1260</td>\n",
" </tr>\n",
" <tr>\n",
" <th>113035</th>\n",
" <td>2016-03-04</td>\n",
" <td>4</td>\n",
" <td>March</td>\n",
" <td>2016</td>\n",
" <td>37</td>\n",
" <td>Adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>France</td>\n",
" <td>Seine (Paris)</td>\n",
" <td>Clothing</td>\n",
" <td>Vests</td>\n",
" <td>Classic Vest, L</td>\n",
" <td>23</td>\n",
" <td>24</td>\n",
" <td>64</td>\n",
" <td>655</td>\n",
" <td>552</td>\n",
" <td>1207</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>113036 rows × 18 columns</p>\n",
"</div>"
],
"text/plain": [
" Date Day Month Year Customer_Age Age_Group \\\n",
"0 2013-11-26 26 November 2013 19 Youth (<25) \n",
"1 2015-11-26 26 November 2015 19 Youth (<25) \n",
"2 2014-03-23 23 March 2014 49 Adults (35-64) \n",
"3 2016-03-23 23 March 2016 49 Adults (35-64) \n",
"4 2014-05-15 15 May 2014 47 Adults (35-64) \n",
"... ... ... ... ... ... ... \n",
"113031 2016-04-12 12 April 2016 41 Adults (35-64) \n",
"113032 2014-04-02 2 April 2014 18 Youth (<25) \n",
"113033 2016-04-02 2 April 2016 18 Youth (<25) \n",
"113034 2014-03-04 4 March 2014 37 Adults (35-64) \n",
"113035 2016-03-04 4 March 2016 37 Adults (35-64) \n",
"\n",
" Customer_Gender Country State Product_Category \\\n",
"0 M Canada British Columbia Accessories \n",
"1 M Canada British Columbia Accessories \n",
"2 M Australia New South Wales Accessories \n",
"3 M Australia New South Wales Accessories \n",
"4 F Australia New South Wales Accessories \n",
"... ... ... ... ... \n",
"113031 M United Kingdom England Clothing \n",
"113032 M Australia Queensland Clothing \n",
"113033 M Australia Queensland Clothing \n",
"113034 F France Seine (Paris) Clothing \n",
"113035 F France Seine (Paris) Clothing \n",
"\n",
" Sub_Category Product Order_Quantity Unit_Cost \\\n",
"0 Bike Racks Hitch Rack - 4-Bike 8 45 \n",
"1 Bike Racks Hitch Rack - 4-Bike 8 45 \n",
"2 Bike Racks Hitch Rack - 4-Bike 23 45 \n",
"3 Bike Racks Hitch Rack - 4-Bike 20 45 \n",
"4 Bike Racks Hitch Rack - 4-Bike 4 45 \n",
"... ... ... ... ... \n",
"113031 Vests Classic Vest, S 3 24 \n",
"113032 Vests Classic Vest, M 22 24 \n",
"113033 Vests Classic Vest, M 22 24 \n",
"113034 Vests Classic Vest, L 24 24 \n",
"113035 Vests Classic Vest, L 23 24 \n",
"\n",
" Unit_Price Profit Cost Revenue \n",
"0 120 590 360 950 \n",
"1 120 590 360 950 \n",
"2 120 1366 1035 2401 \n",
"3 120 1188 900 2088 \n",
"4 120 238 180 418 \n",
"... ... ... ... ... \n",
"113031 64 112 72 184 \n",
"113032 64 655 528 1183 \n",
"113033 64 655 528 1183 \n",
"113034 64 684 576 1260 \n",
"113035 64 655 552 1207 \n",
"\n",
"[113036 rows x 18 columns]"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bikes = pd.read_csv('Sales.csv')\n",
"bikes"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "07609710",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Date 0\n",
"Day 0\n",
"Month 0\n",
"Year 0\n",
"Customer_Age 0\n",
"Age_Group 0\n",
"Customer_Gender 0\n",
"Country 0\n",
"State 0\n",
"Product_Category 0\n",
"Sub_Category 0\n",
"Product 0\n",
"Order_Quantity 0\n",
"Unit_Cost 0\n",
"Unit_Price 0\n",
"Profit 0\n",
"Cost 0\n",
"Revenue 0\n",
"dtype: int64"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bikes.isnull().sum()\n",
"#Zbiór jest już wyczyszczony z artefaktów"
]
},
{
"cell_type": "code",
"execution_count": 56,
"id": "8ce77456",
"metadata": {},
"outputs": [],
"source": [
"#Normalizacja danych poprzez ustawienie małych liter w zbiorze\n",
"bikes['Month'] = bikes['Month'].str.lower()\n",
"bikes['Age_Group'] = bikes['Age_Group'].str.lower()\n",
"bikes['Country'] = bikes['Country'].str.lower()\n",
"bikes['State'] = bikes['State'].str.lower()\n",
"bikes['Product_Category'] = bikes['Product_Category'].str.lower()\n",
"bikes['Sub_Category'] = bikes['Sub_Category'].str.lower()\n",
"bikes['Product'] = bikes['Product'].str.lower()\n"
]
},
{
"cell_type": "code",
"execution_count": 57,
"id": "5d3e05c8",
"metadata": {},
"outputs": [],
"source": [
"#Podział na zbiory\n",
"from sklearn.model_selection import train_test_split\n"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "0897b7b6",
"metadata": {},
"outputs": [],
"source": [
"bikes_train, bikes_test = train_test_split(bikes, test_size=0.2, random_state=1)"
]
},
{
"cell_type": "code",
"execution_count": 59,
"id": "60d4cafa",
"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>Date</th>\n",
" <th>Day</th>\n",
" <th>Month</th>\n",
" <th>Year</th>\n",
" <th>Customer_Age</th>\n",
" <th>Age_Group</th>\n",
" <th>Customer_Gender</th>\n",
" <th>Country</th>\n",
" <th>State</th>\n",
" <th>Product_Category</th>\n",
" <th>Sub_Category</th>\n",
" <th>Product</th>\n",
" <th>Order_Quantity</th>\n",
" <th>Unit_Cost</th>\n",
" <th>Unit_Price</th>\n",
" <th>Profit</th>\n",
" <th>Cost</th>\n",
" <th>Revenue</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>31242</th>\n",
" <td>2013-09-02</td>\n",
" <td>2</td>\n",
" <td>september</td>\n",
" <td>2013</td>\n",
" <td>25</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>F</td>\n",
" <td>australia</td>\n",
" <td>queensland</td>\n",
" <td>accessories</td>\n",
" <td>helmets</td>\n",
" <td>sport-100 helmet, red</td>\n",
" <td>11</td>\n",
" <td>13</td>\n",
" <td>35</td>\n",
" <td>180</td>\n",
" <td>143</td>\n",
" <td>323</td>\n",
" </tr>\n",
" <tr>\n",
" <th>76421</th>\n",
" <td>2015-10-06</td>\n",
" <td>6</td>\n",
" <td>october</td>\n",
" <td>2015</td>\n",
" <td>29</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>M</td>\n",
" <td>australia</td>\n",
" <td>queensland</td>\n",
" <td>accessories</td>\n",
" <td>tires and tubes</td>\n",
" <td>ll mountain tire</td>\n",
" <td>30</td>\n",
" <td>9</td>\n",
" <td>25</td>\n",
" <td>360</td>\n",
" <td>270</td>\n",
" <td>630</td>\n",
" </tr>\n",
" <tr>\n",
" <th>63417</th>\n",
" <td>2016-05-04</td>\n",
" <td>4</td>\n",
" <td>may</td>\n",
" <td>2016</td>\n",
" <td>44</td>\n",
" <td>adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>united states</td>\n",
" <td>oregon</td>\n",
" <td>bikes</td>\n",
" <td>road bikes</td>\n",
" <td>road-750 black, 44</td>\n",
" <td>1</td>\n",
" <td>344</td>\n",
" <td>540</td>\n",
" <td>120</td>\n",
" <td>344</td>\n",
" <td>464</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13214</th>\n",
" <td>2013-11-23</td>\n",
" <td>23</td>\n",
" <td>november</td>\n",
" <td>2013</td>\n",
" <td>42</td>\n",
" <td>adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>united states</td>\n",
" <td>washington</td>\n",
" <td>accessories</td>\n",
" <td>bottles and cages</td>\n",
" <td>mountain bottle cage</td>\n",
" <td>29</td>\n",
" <td>4</td>\n",
" <td>10</td>\n",
" <td>110</td>\n",
" <td>116</td>\n",
" <td>226</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17882</th>\n",
" <td>2013-12-25</td>\n",
" <td>25</td>\n",
" <td>december</td>\n",
" <td>2013</td>\n",
" <td>46</td>\n",
" <td>adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>germany</td>\n",
" <td>nordrhein-westfalen</td>\n",
" <td>clothing</td>\n",
" <td>caps</td>\n",
" <td>awc logo cap</td>\n",
" <td>19</td>\n",
" <td>7</td>\n",
" <td>9</td>\n",
" <td>16</td>\n",
" <td>133</td>\n",
" <td>149</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",
" </tr>\n",
" <tr>\n",
" <th>36385</th>\n",
" <td>2016-06-29</td>\n",
" <td>29</td>\n",
" <td>june</td>\n",
" <td>2016</td>\n",
" <td>40</td>\n",
" <td>adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>australia</td>\n",
" <td>new south wales</td>\n",
" <td>accessories</td>\n",
" <td>helmets</td>\n",
" <td>sport-100 helmet, red</td>\n",
" <td>1</td>\n",
" <td>13</td>\n",
" <td>35</td>\n",
" <td>17</td>\n",
" <td>13</td>\n",
" <td>30</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11506</th>\n",
" <td>2014-03-04</td>\n",
" <td>4</td>\n",
" <td>march</td>\n",
" <td>2014</td>\n",
" <td>44</td>\n",
" <td>adults (35-64)</td>\n",
" <td>F</td>\n",
" <td>united states</td>\n",
" <td>california</td>\n",
" <td>accessories</td>\n",
" <td>bottles and cages</td>\n",
" <td>water bottle - 30 oz.</td>\n",
" <td>20</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>58</td>\n",
" <td>40</td>\n",
" <td>98</td>\n",
" </tr>\n",
" <tr>\n",
" <th>52187</th>\n",
" <td>2015-12-18</td>\n",
" <td>18</td>\n",
" <td>december</td>\n",
" <td>2015</td>\n",
" <td>23</td>\n",
" <td>youth (&lt;25)</td>\n",
" <td>M</td>\n",
" <td>united kingdom</td>\n",
" <td>england</td>\n",
" <td>bikes</td>\n",
" <td>mountain bikes</td>\n",
" <td>mountain-400-w silver, 46</td>\n",
" <td>1</td>\n",
" <td>420</td>\n",
" <td>769</td>\n",
" <td>318</td>\n",
" <td>420</td>\n",
" <td>738</td>\n",
" </tr>\n",
" <tr>\n",
" <th>83391</th>\n",
" <td>2015-12-12</td>\n",
" <td>12</td>\n",
" <td>december</td>\n",
" <td>2015</td>\n",
" <td>26</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>F</td>\n",
" <td>australia</td>\n",
" <td>victoria</td>\n",
" <td>accessories</td>\n",
" <td>tires and tubes</td>\n",
" <td>ml road tire</td>\n",
" <td>22</td>\n",
" <td>9</td>\n",
" <td>25</td>\n",
" <td>237</td>\n",
" <td>198</td>\n",
" <td>435</td>\n",
" </tr>\n",
" <tr>\n",
" <th>112433</th>\n",
" <td>2015-09-17</td>\n",
" <td>17</td>\n",
" <td>september</td>\n",
" <td>2015</td>\n",
" <td>32</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>M</td>\n",
" <td>germany</td>\n",
" <td>hamburg</td>\n",
" <td>clothing</td>\n",
" <td>vests</td>\n",
" <td>classic vest, l</td>\n",
" <td>31</td>\n",
" <td>24</td>\n",
" <td>64</td>\n",
" <td>1101</td>\n",
" <td>744</td>\n",
" <td>1845</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>22608 rows × 18 columns</p>\n",
"</div>"
],
"text/plain": [
" Date Day Month Year Customer_Age Age_Group \\\n",
"31242 2013-09-02 2 september 2013 25 young adults (25-34) \n",
"76421 2015-10-06 6 october 2015 29 young adults (25-34) \n",
"63417 2016-05-04 4 may 2016 44 adults (35-64) \n",
"13214 2013-11-23 23 november 2013 42 adults (35-64) \n",
"17882 2013-12-25 25 december 2013 46 adults (35-64) \n",
"... ... ... ... ... ... ... \n",
"36385 2016-06-29 29 june 2016 40 adults (35-64) \n",
"11506 2014-03-04 4 march 2014 44 adults (35-64) \n",
"52187 2015-12-18 18 december 2015 23 youth (<25) \n",
"83391 2015-12-12 12 december 2015 26 young adults (25-34) \n",
"112433 2015-09-17 17 september 2015 32 young adults (25-34) \n",
"\n",
" Customer_Gender Country State Product_Category \\\n",
"31242 F australia queensland accessories \n",
"76421 M australia queensland accessories \n",
"63417 F united states oregon bikes \n",
"13214 F united states washington accessories \n",
"17882 F germany nordrhein-westfalen clothing \n",
"... ... ... ... ... \n",
"36385 F australia new south wales accessories \n",
"11506 F united states california accessories \n",
"52187 M united kingdom england bikes \n",
"83391 F australia victoria accessories \n",
"112433 M germany hamburg clothing \n",
"\n",
" Sub_Category Product Order_Quantity \\\n",
"31242 helmets sport-100 helmet, red 11 \n",
"76421 tires and tubes ll mountain tire 30 \n",
"63417 road bikes road-750 black, 44 1 \n",
"13214 bottles and cages mountain bottle cage 29 \n",
"17882 caps awc logo cap 19 \n",
"... ... ... ... \n",
"36385 helmets sport-100 helmet, red 1 \n",
"11506 bottles and cages water bottle - 30 oz. 20 \n",
"52187 mountain bikes mountain-400-w silver, 46 1 \n",
"83391 tires and tubes ml road tire 22 \n",
"112433 vests classic vest, l 31 \n",
"\n",
" Unit_Cost Unit_Price Profit Cost Revenue \n",
"31242 13 35 180 143 323 \n",
"76421 9 25 360 270 630 \n",
"63417 344 540 120 344 464 \n",
"13214 4 10 110 116 226 \n",
"17882 7 9 16 133 149 \n",
"... ... ... ... ... ... \n",
"36385 13 35 17 13 30 \n",
"11506 2 5 58 40 98 \n",
"52187 420 769 318 420 738 \n",
"83391 9 25 237 198 435 \n",
"112433 24 64 1101 744 1845 \n",
"\n",
"[22608 rows x 18 columns]"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bikes_test"
]
},
{
"cell_type": "code",
"execution_count": 63,
"id": "8782204a",
"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>Date</th>\n",
" <th>Day</th>\n",
" <th>Month</th>\n",
" <th>Year</th>\n",
" <th>Customer_Age</th>\n",
" <th>Age_Group</th>\n",
" <th>Customer_Gender</th>\n",
" <th>Country</th>\n",
" <th>State</th>\n",
" <th>Product_Category</th>\n",
" <th>Sub_Category</th>\n",
" <th>Product</th>\n",
" <th>Order_Quantity</th>\n",
" <th>Unit_Cost</th>\n",
" <th>Unit_Price</th>\n",
" <th>Profit</th>\n",
" <th>Cost</th>\n",
" <th>Revenue</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>47030</th>\n",
" <td>2014-01-10</td>\n",
" <td>10</td>\n",
" <td>january</td>\n",
" <td>2014</td>\n",
" <td>23</td>\n",
" <td>youth (&lt;25)</td>\n",
" <td>F</td>\n",
" <td>france</td>\n",
" <td>loiret</td>\n",
" <td>clothing</td>\n",
" <td>jerseys</td>\n",
" <td>short-sleeve classic jersey, l</td>\n",
" <td>2</td>\n",
" <td>42</td>\n",
" <td>54</td>\n",
" <td>12</td>\n",
" <td>84</td>\n",
" <td>96</td>\n",
" </tr>\n",
" <tr>\n",
" <th>36579</th>\n",
" <td>2016-05-04</td>\n",
" <td>4</td>\n",
" <td>may</td>\n",
" <td>2016</td>\n",
" <td>34</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>F</td>\n",
" <td>united states</td>\n",
" <td>california</td>\n",
" <td>accessories</td>\n",
" <td>helmets</td>\n",
" <td>sport-100 helmet, black</td>\n",
" <td>14</td>\n",
" <td>13</td>\n",
" <td>35</td>\n",
" <td>298</td>\n",
" <td>182</td>\n",
" <td>480</td>\n",
" </tr>\n",
" <tr>\n",
" <th>88485</th>\n",
" <td>2016-01-06</td>\n",
" <td>6</td>\n",
" <td>january</td>\n",
" <td>2016</td>\n",
" <td>34</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>M</td>\n",
" <td>france</td>\n",
" <td>loiret</td>\n",
" <td>accessories</td>\n",
" <td>tires and tubes</td>\n",
" <td>touring tire tube</td>\n",
" <td>20</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>49</td>\n",
" <td>40</td>\n",
" <td>89</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12816</th>\n",
" <td>2014-07-15</td>\n",
" <td>15</td>\n",
" <td>july</td>\n",
" <td>2014</td>\n",
" <td>40</td>\n",
" <td>adults (35-64)</td>\n",
" <td>M</td>\n",
" <td>germany</td>\n",
" <td>bayern</td>\n",
" <td>accessories</td>\n",
" <td>bottles and cages</td>\n",
" <td>water bottle - 30 oz.</td>\n",
" <td>6</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>18</td>\n",
" <td>12</td>\n",
" <td>30</td>\n",
" </tr>\n",
" <tr>\n",
" <th>109397</th>\n",
" <td>2015-11-29</td>\n",
" <td>29</td>\n",
" <td>november</td>\n",
" <td>2015</td>\n",
" <td>22</td>\n",
" <td>youth (&lt;25)</td>\n",
" <td>F</td>\n",
" <td>australia</td>\n",
" <td>queensland</td>\n",
" <td>bikes</td>\n",
" <td>touring bikes</td>\n",
" <td>touring-2000 blue, 46</td>\n",
" <td>1</td>\n",
" <td>755</td>\n",
" <td>1215</td>\n",
" <td>266</td>\n",
" <td>755</td>\n",
" <td>1021</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",
" </tr>\n",
" <tr>\n",
" <th>50057</th>\n",
" <td>2015-11-16</td>\n",
" <td>16</td>\n",
" <td>november</td>\n",
" <td>2015</td>\n",
" <td>24</td>\n",
" <td>youth (&lt;25)</td>\n",
" <td>M</td>\n",
" <td>united states</td>\n",
" <td>washington</td>\n",
" <td>bikes</td>\n",
" <td>mountain bikes</td>\n",
" <td>mountain-200 silver, 38</td>\n",
" <td>3</td>\n",
" <td>1266</td>\n",
" <td>2320</td>\n",
" <td>1631</td>\n",
" <td>3798</td>\n",
" <td>5429</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98047</th>\n",
" <td>2013-09-10</td>\n",
" <td>10</td>\n",
" <td>september</td>\n",
" <td>2013</td>\n",
" <td>28</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>M</td>\n",
" <td>australia</td>\n",
" <td>new south wales</td>\n",
" <td>accessories</td>\n",
" <td>tires and tubes</td>\n",
" <td>ml road tire</td>\n",
" <td>12</td>\n",
" <td>9</td>\n",
" <td>25</td>\n",
" <td>153</td>\n",
" <td>108</td>\n",
" <td>261</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5192</th>\n",
" <td>2016-05-26</td>\n",
" <td>26</td>\n",
" <td>may</td>\n",
" <td>2016</td>\n",
" <td>33</td>\n",
" <td>young adults (25-34)</td>\n",
" <td>M</td>\n",
" <td>australia</td>\n",
" <td>new south wales</td>\n",
" <td>accessories</td>\n",
" <td>bottles and cages</td>\n",
" <td>water bottle - 30 oz.</td>\n",
" <td>15</td>\n",
" <td>2</td>\n",
" <td>5</td>\n",
" <td>35</td>\n",
" <td>30</td>\n",
" <td>65</td>\n",
" </tr>\n",
" <tr>\n",
" <th>77708</th>\n",
" <td>2013-11-11</td>\n",
" <td>11</td>\n",
" <td>november</td>\n",
" <td>2013</td>\n",
" <td>63</td>\n",
" <td>adults (35-64)</td>\n",
" <td>M</td>\n",
" <td>united states</td>\n",
" <td>california</td>\n",
" <td>accessories</td>\n",
" <td>tires and tubes</td>\n",
" <td>hl mountain tire</td>\n",
" <td>21</td>\n",
" <td>13</td>\n",
" <td>35</td>\n",
" <td>447</td>\n",
" <td>273</td>\n",
" <td>720</td>\n",
" </tr>\n",
" <tr>\n",
" <th>98539</th>\n",
" <td>2016-04-14</td>\n",
" <td>14</td>\n",
" <td>april</td>\n",
" <td>2016</td>\n",
" <td>46</td>\n",
" <td>adults (35-64)</td>\n",
" <td>M</td>\n",
" <td>united states</td>\n",
" <td>washington</td>\n",
" <td>accessories</td>\n",
" <td>tires and tubes</td>\n",
" <td>hl road tire</td>\n",
" <td>22</td>\n",
" <td>12</td>\n",
" <td>33</td>\n",
" <td>302</td>\n",
" <td>264</td>\n",
" <td>566</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>90428 rows × 18 columns</p>\n",
"</div>"
],
"text/plain": [
" Date Day Month Year Customer_Age Age_Group \\\n",
"47030 2014-01-10 10 january 2014 23 youth (<25) \n",
"36579 2016-05-04 4 may 2016 34 young adults (25-34) \n",
"88485 2016-01-06 6 january 2016 34 young adults (25-34) \n",
"12816 2014-07-15 15 july 2014 40 adults (35-64) \n",
"109397 2015-11-29 29 november 2015 22 youth (<25) \n",
"... ... ... ... ... ... ... \n",
"50057 2015-11-16 16 november 2015 24 youth (<25) \n",
"98047 2013-09-10 10 september 2013 28 young adults (25-34) \n",
"5192 2016-05-26 26 may 2016 33 young adults (25-34) \n",
"77708 2013-11-11 11 november 2013 63 adults (35-64) \n",
"98539 2016-04-14 14 april 2016 46 adults (35-64) \n",
"\n",
" Customer_Gender Country State Product_Category \\\n",
"47030 F france loiret clothing \n",
"36579 F united states california accessories \n",
"88485 M france loiret accessories \n",
"12816 M germany bayern accessories \n",
"109397 F australia queensland bikes \n",
"... ... ... ... ... \n",
"50057 M united states washington bikes \n",
"98047 M australia new south wales accessories \n",
"5192 M australia new south wales accessories \n",
"77708 M united states california accessories \n",
"98539 M united states washington accessories \n",
"\n",
" Sub_Category Product Order_Quantity \\\n",
"47030 jerseys short-sleeve classic jersey, l 2 \n",
"36579 helmets sport-100 helmet, black 14 \n",
"88485 tires and tubes touring tire tube 20 \n",
"12816 bottles and cages water bottle - 30 oz. 6 \n",
"109397 touring bikes touring-2000 blue, 46 1 \n",
"... ... ... ... \n",
"50057 mountain bikes mountain-200 silver, 38 3 \n",
"98047 tires and tubes ml road tire 12 \n",
"5192 bottles and cages water bottle - 30 oz. 15 \n",
"77708 tires and tubes hl mountain tire 21 \n",
"98539 tires and tubes hl road tire 22 \n",
"\n",
" Unit_Cost Unit_Price Profit Cost Revenue \n",
"47030 42 54 12 84 96 \n",
"36579 13 35 298 182 480 \n",
"88485 2 5 49 40 89 \n",
"12816 2 5 18 12 30 \n",
"109397 755 1215 266 755 1021 \n",
"... ... ... ... ... ... \n",
"50057 1266 2320 1631 3798 5429 \n",
"98047 9 25 153 108 261 \n",
"5192 2 5 35 30 65 \n",
"77708 13 35 447 273 720 \n",
"98539 12 33 302 264 566 \n",
"\n",
"[90428 rows x 18 columns]"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bikes_train"
]
},
{
"cell_type": "code",
"execution_count": 64,
"id": "4874398c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"adults (35-64) 55824\n",
"young adults (25-34) 38654\n",
"youth (<25) 17828\n",
"seniors (64+) 730\n",
"Name: Age_Group, dtype: int64"
]
},
"execution_count": 64,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bikes[\"Age_Group\"].value_counts()"
]
},
{
"cell_type": "code",
"execution_count": 65,
"id": "e1a03dd7",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: >"
]
},
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkEAAAIyCAYAAADMsh7CAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABSe0lEQVR4nO3deVyU5f7/8fcADi4sQhLHXSAXUlG0VNKwNPc9M1tOafpTs1zLjmVadqqDdczdCggz0+xUllmaWWqS5Tnlkra7QKa45sKAIsMyvz98MN8m9JxQmBu5Xs/HowfNfV9z35+571HfXPd1X7fN5XK5BAAAYBgfqwsAAACwAiEIAAAYiRAEAACMRAgCAABGIgQBAAAjEYIAAICRCEEAAMBIhCAAAGAkP6sLKM9cLpcKC82bS9LHx2bk5zYV59ssnG+zmHi+fXxsstlsf6otIei/KCx06eTJM1aX4VV+fj4KCakmh+Os8vMLrS4HZYzzbRbOt1lMPd+hodXk6/vnQhCXwwAAgJEIQQAAwEiEIAAAYCRCEAAAMBIhCAAAGIkQBAAAjEQIAgAARiIEAQAAIxGCAACAkQhBAADASIQgAABgJEIQAAAwEiEIAAAYiRAEAACMRAgCAABG8rO6AFyYj49NPj42r+/X19fH46e3FRa6VFjosmTfAACzEILKIR8fm6pXr2pZEJGkoKAqluy3oKBQp0+fJQgBA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fKlG1gzXnoZt06tQZrl97SdF3jWNuBs63WUw936Gh1f70wGgmDwAAAEYiBAEAACMRggAAgJEIQQAAwEiEIAAAYCRCEAAAMBIhCAAAGIkQBAAAjEQIAgAARiIEAQAAIxGCAACAkQhBAADASIQgAABgJEIQAAAwEiEIAAAYiRAEAACMRAgCAABGIgQBAAAjEYIAAICRCEEAAMBIhCAAAGAkQhAAADASIQgAABiJEAQAAIxECAIAAEYiBAEAACMRggAAgJEIQQAAwEiEIAAAYCRCEAAAMBIhCAAAGIkQBAAAjEQIAgAARiIEAQAAIxGCAACAkQhBAADASIQgAABgJEIQAAAwEiEIAAAYiRAEAACMRAgCAABGIgQBAAAjEYIAAICRCEEAAMBIhCAAAGAkQhAAADASIQgAABiJEAQAAIxECAIAAEYiBAEAACNdVgg6c+aM4uPj1bhxY3377bce695++21169ZNzZs3V9++fbVx48Zi78/KytKUKVPUpk0bxcbGaty4cTp27Fixdtu3b9fgwYMVExOjm2++WUlJSXK5XB5tXC6XkpKSdNNNNykmJkaDBw/WN998czkfDwAAVGCXFYJefPFFFRQUFFu+evVqTZs2TT169FBycrJatmypMWPGFAslEyZM0BdffKHp06dr5syZSk9P14gRI5Sfn+9us3//fg0fPlxhYWFKTEzUkCFDNG/ePC1atMhjW8nJyZo3b56GDh2qxMREhYWFadiwYTpw4MDlfEQAAFBBXXII2rdvn9544w2NHTu22Lp58+apV69emjBhgtq1a6e///3vat68uRYuXOhus2PHDm3evFnPPvusevbsqc6dO2vu3Ln6+eeftW7dOne7lJQUhYSEaNasWYqLi9PQoUM1bNgwvfzyy3I6nZKk3NxcJSYmatiwYRo6dKji4uI0a9YsVa9eXSkpKZf6EQEAQAV2ySHomWee0R133KGIiAiP5QcOHNAvv/yiHj16eCzv2bOntmzZ4g4uqampCgoKUvv27d1tIiMjFR0drdTUVPey1NRUde7cWXa73WNbDodDO3bskHT+cll2drbHPu12u7p06eKxLQAAgCKXFILWrl2r3bt368EHHyy2Li0tTZKKhaOoqCjl5eW5L0+lpaU
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"bikes[\"Age_Group\"].value_counts().plot(kind=\"bar\")"
]
},
{
"cell_type": "code",
"execution_count": 66,
"id": "c2ebf497",
"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>Profit</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Year</th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>2011</th>\n",
" <td>1076.317146</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2012</th>\n",
" <td>1102.724318</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2013</th>\n",
" <td>243.800188</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2014</th>\n",
" <td>199.472311</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2015</th>\n",
" <td>308.004868</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2016</th>\n",
" <td>239.334240</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Profit\n",
"Year \n",
"2011 1076.317146\n",
"2012 1102.724318\n",
"2013 243.800188\n",
"2014 199.472311\n",
"2015 308.004868\n",
"2016 239.334240"
]
},
"execution_count": 66,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
" bikes[[\"Year\",\"Profit\"]].groupby(\"Year\").mean()"
]
},
{
"cell_type": "code",
"execution_count": 67,
"id": "3bbd4d07",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Axes: xlabel='Year'>"
]
},
"execution_count": 67,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjcAAAHQCAYAAABdgUsJAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAzqElEQVR4nO3deXxU9b3/8fdMNgNkkoA0LgRJQmWNJIoEJKYIKiZB0GpU1OICuAaEW25ByqZgoIqyBoSAcnEvWrUCItc1P2jKrQqliBUkCQYVkSWZAMEsM78/aKaMoaxnMjPfvJ6PRx+aM9+c+Zx3Unlz5swZm9vtdgsAAMAQdn8PAAAAYCXKDQAAMArlBgAAGIVyAwAAjEK5AQAARqHcAAAAo1BuAACAUSg3AADAKKH+HsBf3G63XK7Avn+h3W4L+BmDBVlagxytQ5bWIUtrBEOOdrtNNpvtpOuabLlxudzav/+Qv8f4j0JD7YqNbS6n87Bqa13+HieokaU1yNE6ZGkdsrRGsOTYsmVzhYScvNzwshQAADAK5QYAABiFcgMAAIxCuQEAAEah3AAAAKM02XdLAQBwMi6XS3V1tf4ew+dcLpuOHAlRdfVPqqvzz9vBQ0JCZbdbc86FcgMAwM+43W45nftVVXXQ36M0mr177XK5/Ps28MjIFnI4Wp7SvWxOhHIDAMDP1BebFi1iFR4ecdZ/2AaDkBCb387auN1uVVf/pIMHD0iSoqNbndX+KDcAABzD5arzFJsWLRz+HqfRhIba/XoDv/DwCEnSwYMHFBUVe1YvUXFBMQAAx6irq5P07z9s0XjqMz/b65woNwAAHEdTeCkq0FiVOeUGAAAYhWtuAAA4RXa7TXa7f87ouFzugP/U7kBBuQEA4BTY7TbFxDRTSIh/XvSoq3OpvPzwaRWcpUsX6fnnCzxfx8TEKDGxvYYOvV/duqWe9UxfffVPPf30DO3YsV0//fST3n33I91zz+264op0/dd/jZUkFRZ+rL17f9Svf51z1s93qig3AACcArvdppAQu2a+9Jl2/VDZqM/dJi5KY+64THa77bTP3kRERGjOnGclST/++IOWLVuqRx55UM8996ISE9uf1VyzZz8ll8ulp56ao/DwCDVr1kx5eU8pKurf7zL7f//vY/3zn1spN2jarD7tW/+3LCv/tsXpYaDp2vVDpXZ8W+HvMU6Z3W5X167J//oqWZ06dVVOzvV66603PGdX6rndbtXU1Cg8PPyU9v3NN6W68cYcXXppd8+2iy/uaNXoZ4xyg4Diy9O+DkekZfs6k9PDABAIzjvvPMXExOr777/TE09M0T//uVUPPTRSixblq7S0RJMnT9NVV12tTz75UM8/v0TffFOqqCiHrr76Wt1338OKiIjQ559/qpEjH5AkLVu2RMuWLVFKyqWaP3+xbr75es/LUk88MUXvvrtSkpSefrQAZWYO0O9/P8Wnx0i5QUDx52nfU3U2p4cBwN8OHToop7NC557bWrW1tdq7d69mz56pe+4Zptat4xQXd57WrftEEyaMVb9+1+qBB3L1zTelWrQoXz/8sFvTpj2pDh066tlnn9fo0Q+rX79rNGDADWrevHmD57r77mEqLz+gnTtLNWnSNElSbGysz4+RcoOAFGynfQEgkNXWHr0p3o8/7tH8+bNUV1enPn366f3331NlpVMzZ85Vt26XeO5QPGnSOHXpkqwpU56QJPXseYUiIs7RU0/laceOr5WU1F5duyYrJMSu1q1/cczLXt4uvLCNYmJitXv39/9xjS9wnxsAAAxWVVWlPn16qk+fnsrJGajPP/9Mo0f/TmlpvSRJ0dHR6tKlq2f94cOHtX37NvXp09drP/36XStJ2rx5U6PNfqY4cwMAgMEiIiKUn18gyaaYmBj94hdxXp/bFBvr/SGVBw9Wyu12q2VL7+0tWrRQeHi4nM7AP6tOuQEAwGB2u10dO3b+j4///BMPWrSIks1m04ED+722Hzx4UNXV1XI4on0xpqV4WQoAAHg0a9ZMv/zlxfr44w+8tn/44f9Kki65JOW09hcaGqbq6mqrxju152zUZzNYMNybReL+LABwttrERRn/nPfee58efXSMHn98oq69NlPffLNTixfnq0+fvkpKOr0b/7Vr106rV/9Z//u/axQf31bR0TE6//wLf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WFhXI4HOrdu7dnTWJiojp16qTCwkLPtsLCQvXr18+rxGRlZcnpdGrjxo2nOz4AADCc5Z8tVVxcLOnoWZhjJSUlqaamRmVlZUpKSlJxcbESEhIafIx8YmKiZx+HDx/W999/r8TExAZrbDabiouLlZaWdsazhoZacz11SEhwXZcdyPMG8mw/F0yzWqH+eJvacfsCWVqHLK1hWo6Wl5uKigpJksPh8Npe/3X9406nU1FRUQ2+Pzo62vNSV2Vl5XH3FR4ersjISM++zoTdblNsbPMz/v5g5nBE+nsEIzTVHJvqcfsCWVqHLK1hSo5N9lPBXS63nM7DluwrJMQeVL8QTmeV6uoC81NfgynLQM7RF+p/Nk3tuH2BLK1DltYIlhwdjshTOrtkebmJjo6WdPSsS+vWrT3bnU6n1+MOh0O7d+9u8P0VFRWeNfVndurP4NSrrq5WVVWVZ92ZMuFj3c9EXZ2ryR67lZpqjk31uH2BLK1DltYwJUfLX1yrvz6m/rqZesXFxQoLC1N8fLxnXUlJSYP71ZSUlHj20axZM51//vkN9lX/fT+/FgcAAMDychMfH6927dppzZo1XttXr16tXr16ed71lJGRoYqKChUVFXnWlJSUaOvWrcrIyPBsy8jI0AcffKCamhqvfTkcDqWmplo9PgAACHKn/bJUVVWVPvnkE0nSt99+q4MHD3qKTI8ePdSyZUuNGDFCY8aMUdu2bZWWlqbVq1dr8+bNevHFFz37SU1NVXp6usaPH6+xY8cqIiJCs2bNUocOHXTttdd61g0dOlTvvPOOfvvb32rw4MH
"text/plain": [
"<Figure size 640x480 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
" bikes[[\"Year\",\"Profit\"]].groupby(\"Year\").mean().plot(kind=\"bar\")"
]
},
{
"cell_type": "code",
"execution_count": 68,
"id": "0786ffaf",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<seaborn.axisgrid.FacetGrid at 0x7f807fceafb0>"
]
},
"execution_count": 68,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgo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HREREfFaCjoiIiLitRR0RERExGsp6IiIiIjXUtARERERr6WgIyIiIl5LQUdERES8loKOiIiIeC0FHREREfFaCjoiIiLitRR0RERExGsp6IiIiIjXUtARERERr6WgIyIiIl5LQUdERES8loKOiIiIeC0FHREREfFaCjoiIiLitVpU0Nm6dSt33nknffv2pWfPngwaNIjFixdTVFTk0u7DDz/kxhtvJCEhgaFDh7Jhwwa3Y1VWVvLII4+QkpJCYmIi48ePJzc3163dwYMHGT9+PImJiaSkpLB06VIqKysb7RxFRESk6fg0dwd+7MyZM/Tq1YvRo0cTHh7O/v37WblyJfv37+fZZ58F4LPPPmPq1KnccsstzJ07l//7v//jf//3fwkODuaGG25wHuuhhx4iMzOTOXPmEB0dzdNPP824cePYuHEjoaGhAFgsFsaOHUuXLl1YuXIlBQUFLFmyhPLychYsWNAsNRAREZGG06KCzsiRI11eJycn4+fnx/z58ykoKCA6OprVq1fTq1cv/vSnPwHQt29fjhw5whNPPOEMOvn5+bz++uv88Y9/5JZbbgEgISGBAQMG8MorrzBx4kQAXnnlFUpKSli1ahXh4eEA2Gw2Fi1axKRJk4iOjm6iMxcREZHG0KKGrmpTE0CqqqqorKzk008/dblyA5Cens7Bgwc5evQoANu2bcNut7u0Cw8PJyUlhaysLOe2rKws+vXr5/w
"text/plain": [
"<Figure size 593.625x500 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"sns.set_theme()\n",
"sns.relplot(data=bikes, x=\"Unit_Cost\", y=\"Unit_Price\", hue=\"Unit_Cost\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.10.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}