1952 lines
288 KiB
Plaintext
1952 lines
288 KiB
Plaintext
|
{
|
|||
|
"cells": [
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "a6122573",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# Zadanie LAB 1"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "43e77720",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# 1.Pobranie danych ze zbioru"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 1,
|
|||
|
"id": "fbd95f32",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stdout",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"bitcoin-historical-data-jan-2018-jan-2022-per-min.zip: Skipping, found more recently modified local copy (use --force to force download)\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"!kaggle datasets download -d bunnyjr/bitcoin-historical-data-jan-2018-jan-2022-per-min -p ./data"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 2,
|
|||
|
"id": "98e71d52",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"!cd data/"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 3,
|
|||
|
"id": "0cfc8130",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"name": "stderr",
|
|||
|
"output_type": "stream",
|
|||
|
"text": [
|
|||
|
"'unzip' is not recognized as an internal or external command,\n",
|
|||
|
"operable program or batch file.\n"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"!unzip -o bitcoin-historical-data-jan-2018-jan-2022-per-min.zip"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "87fe5a60",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# 2 Podział na podzbiory"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 4,
|
|||
|
"id": "8f6fa72a",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"import pandas as pd\n",
|
|||
|
"\n",
|
|||
|
"btc18 = pd.read_csv('data/BTC2018.csv')\n",
|
|||
|
"btc19 = pd.read_csv('data/BTC2019.csv')\n",
|
|||
|
"btc20 = pd.read_csv('data/BTC2020.csv')\n",
|
|||
|
"btc21 = pd.read_csv('data/BTC2021.csv')\n",
|
|||
|
"\n"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 5,
|
|||
|
"id": "a4675c24",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>0</th>\n",
|
|||
|
" <td>1546300740</td>\n",
|
|||
|
" <td>2018-12-31 23:59:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3693.30</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3693.30</td>\n",
|
|||
|
" <td>9.838855</td>\n",
|
|||
|
" <td>36337.841473</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>1</th>\n",
|
|||
|
" <td>1546300680</td>\n",
|
|||
|
" <td>2018-12-31 23:58:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3691.35</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3691.35</td>\n",
|
|||
|
" <td>0.560000</td>\n",
|
|||
|
" <td>2067.156000</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2</th>\n",
|
|||
|
" <td>1546300620</td>\n",
|
|||
|
" <td>2018-12-31 23:57:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3688.83</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3688.83</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>0.560833</td>\n",
|
|||
|
" <td>2069.059602</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>3</th>\n",
|
|||
|
" <td>1546300560</td>\n",
|
|||
|
" <td>2018-12-31 23:56:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3687.87</td>\n",
|
|||
|
" <td>3689.65</td>\n",
|
|||
|
" <td>3686.92</td>\n",
|
|||
|
" <td>3686.92</td>\n",
|
|||
|
" <td>7.610240</td>\n",
|
|||
|
" <td>28058.346208</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>4</th>\n",
|
|||
|
" <td>1546300500</td>\n",
|
|||
|
" <td>2018-12-31 23:55:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3688.28</td>\n",
|
|||
|
" <td>3688.85</td>\n",
|
|||
|
" <td>3685.00</td>\n",
|
|||
|
" <td>3688.85</td>\n",
|
|||
|
" <td>7.665703</td>\n",
|
|||
|
" <td>28277.629729</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high low \\\n",
|
|||
|
"0 1546300740 2018-12-31 23:59:00 BTC/USD 3689.26 3693.30 3689.26 \n",
|
|||
|
"1 1546300680 2018-12-31 23:58:00 BTC/USD 3689.26 3691.35 3689.26 \n",
|
|||
|
"2 1546300620 2018-12-31 23:57:00 BTC/USD 3688.83 3689.26 3688.83 \n",
|
|||
|
"3 1546300560 2018-12-31 23:56:00 BTC/USD 3687.87 3689.65 3686.92 \n",
|
|||
|
"4 1546300500 2018-12-31 23:55:00 BTC/USD 3688.28 3688.85 3685.00 \n",
|
|||
|
"\n",
|
|||
|
" close Volume BTC Volume USD \n",
|
|||
|
"0 3693.30 9.838855 36337.841473 \n",
|
|||
|
"1 3691.35 0.560000 2067.156000 \n",
|
|||
|
"2 3689.26 0.560833 2069.059602 \n",
|
|||
|
"3 3686.92 7.610240 28058.346208 \n",
|
|||
|
"4 3688.85 7.665703 28277.629729 "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 5,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc18.head()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 6,
|
|||
|
"id": "a0be28b5",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>0</th>\n",
|
|||
|
" <td>1577836740</td>\n",
|
|||
|
" <td>2019-12-31 23:59:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>7167.30</td>\n",
|
|||
|
" <td>7171.22</td>\n",
|
|||
|
" <td>7167.30</td>\n",
|
|||
|
" <td>7168.36</td>\n",
|
|||
|
" <td>0.191448</td>\n",
|
|||
|
" <td>1372.366393</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>1</th>\n",
|
|||
|
" <td>1577836680</td>\n",
|
|||
|
" <td>2019-12-31 23:58:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>7166.89</td>\n",
|
|||
|
" <td>7167.30</td>\n",
|
|||
|
" <td>7161.99</td>\n",
|
|||
|
" <td>7167.30</td>\n",
|
|||
|
" <td>0.568868</td>\n",
|
|||
|
" <td>4077.245538</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2</th>\n",
|
|||
|
" <td>1577836620</td>\n",
|
|||
|
" <td>2019-12-31 23:57:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>7164.22</td>\n",
|
|||
|
" <td>7170.80</td>\n",
|
|||
|
" <td>7161.65</td>\n",
|
|||
|
" <td>7166.89</td>\n",
|
|||
|
" <td>3.959440</td>\n",
|
|||
|
" <td>28376.874525</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>3</th>\n",
|
|||
|
" <td>1577836560</td>\n",
|
|||
|
" <td>2019-12-31 23:56:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>7182.49</td>\n",
|
|||
|
" <td>7182.49</td>\n",
|
|||
|
" <td>7170.20</td>\n",
|
|||
|
" <td>7170.20</td>\n",
|
|||
|
" <td>6.248892</td>\n",
|
|||
|
" <td>44805.802550</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>4</th>\n",
|
|||
|
" <td>1577836500</td>\n",
|
|||
|
" <td>2019-12-31 23:55:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>7175.69</td>\n",
|
|||
|
" <td>7176.68</td>\n",
|
|||
|
" <td>7175.69</td>\n",
|
|||
|
" <td>7176.68</td>\n",
|
|||
|
" <td>0.016877</td>\n",
|
|||
|
" <td>121.122623</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high low \\\n",
|
|||
|
"0 1577836740 2019-12-31 23:59:00 BTC/USD 7167.30 7171.22 7167.30 \n",
|
|||
|
"1 1577836680 2019-12-31 23:58:00 BTC/USD 7166.89 7167.30 7161.99 \n",
|
|||
|
"2 1577836620 2019-12-31 23:57:00 BTC/USD 7164.22 7170.80 7161.65 \n",
|
|||
|
"3 1577836560 2019-12-31 23:56:00 BTC/USD 7182.49 7182.49 7170.20 \n",
|
|||
|
"4 1577836500 2019-12-31 23:55:00 BTC/USD 7175.69 7176.68 7175.69 \n",
|
|||
|
"\n",
|
|||
|
" close Volume BTC Volume USD \n",
|
|||
|
"0 7168.36 0.191448 1372.366393 \n",
|
|||
|
"1 7167.30 0.568868 4077.245538 \n",
|
|||
|
"2 7166.89 3.959440 28376.874525 \n",
|
|||
|
"3 7170.20 6.248892 44805.802550 \n",
|
|||
|
"4 7176.68 0.016877 121.122623 "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 6,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc19.head()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 7,
|
|||
|
"id": "b4304f0a",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>0</th>\n",
|
|||
|
" <td>1609459140</td>\n",
|
|||
|
" <td>2020-12-31 23:59:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>28982.44</td>\n",
|
|||
|
" <td>29024.59</td>\n",
|
|||
|
" <td>28969.83</td>\n",
|
|||
|
" <td>28992.79</td>\n",
|
|||
|
" <td>5.897679</td>\n",
|
|||
|
" <td>170990.182941</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>1</th>\n",
|
|||
|
" <td>1609459080</td>\n",
|
|||
|
" <td>2020-12-31 23:58:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29044.79</td>\n",
|
|||
|
" <td>29048.62</td>\n",
|
|||
|
" <td>29000.12</td>\n",
|
|||
|
" <td>29000.12</td>\n",
|
|||
|
" <td>20.362289</td>\n",
|
|||
|
" <td>590508.837815</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2</th>\n",
|
|||
|
" <td>1609459020</td>\n",
|
|||
|
" <td>2020-12-31 23:57:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29039.53</td>\n",
|
|||
|
" <td>29048.63</td>\n",
|
|||
|
" <td>29023.26</td>\n",
|
|||
|
" <td>29044.79</td>\n",
|
|||
|
" <td>14.503728</td>\n",
|
|||
|
" <td>421257.721488</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>3</th>\n",
|
|||
|
" <td>1609458960</td>\n",
|
|||
|
" <td>2020-12-31 23:56:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29052.02</td>\n",
|
|||
|
" <td>29059.42</td>\n",
|
|||
|
" <td>29039.28</td>\n",
|
|||
|
" <td>29039.53</td>\n",
|
|||
|
" <td>2.707583</td>\n",
|
|||
|
" <td>78626.925850</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>4</th>\n",
|
|||
|
" <td>1609458900</td>\n",
|
|||
|
" <td>2020-12-31 23:55:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29036.10</td>\n",
|
|||
|
" <td>29052.02</td>\n",
|
|||
|
" <td>29025.78</td>\n",
|
|||
|
" <td>29052.02</td>\n",
|
|||
|
" <td>7.631439</td>\n",
|
|||
|
" <td>221708.705383</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high low \\\n",
|
|||
|
"0 1609459140 2020-12-31 23:59:00 BTC/USD 28982.44 29024.59 28969.83 \n",
|
|||
|
"1 1609459080 2020-12-31 23:58:00 BTC/USD 29044.79 29048.62 29000.12 \n",
|
|||
|
"2 1609459020 2020-12-31 23:57:00 BTC/USD 29039.53 29048.63 29023.26 \n",
|
|||
|
"3 1609458960 2020-12-31 23:56:00 BTC/USD 29052.02 29059.42 29039.28 \n",
|
|||
|
"4 1609458900 2020-12-31 23:55:00 BTC/USD 29036.10 29052.02 29025.78 \n",
|
|||
|
"\n",
|
|||
|
" close Volume BTC Volume USD \n",
|
|||
|
"0 28992.79 5.897679 170990.182941 \n",
|
|||
|
"1 29000.12 20.362289 590508.837815 \n",
|
|||
|
"2 29044.79 14.503728 421257.721488 \n",
|
|||
|
"3 29039.53 2.707583 78626.925850 \n",
|
|||
|
"4 29052.02 7.631439 221708.705383 "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 7,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc20.head()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 8,
|
|||
|
"id": "1ac05c7d",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>0</th>\n",
|
|||
|
" <td>1609459260</td>\n",
|
|||
|
" <td>1/1/2021 0:01</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29007.31</td>\n",
|
|||
|
" <td>29086.90</td>\n",
|
|||
|
" <td>29007.31</td>\n",
|
|||
|
" <td>29083.47</td>\n",
|
|||
|
" <td>14.561951</td>\n",
|
|||
|
" <td>423512.06040</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>1</th>\n",
|
|||
|
" <td>1609459320</td>\n",
|
|||
|
" <td>1/1/2021 0:02</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29069.80</td>\n",
|
|||
|
" <td>29073.02</td>\n",
|
|||
|
" <td>29028.14</td>\n",
|
|||
|
" <td>29035.89</td>\n",
|
|||
|
" <td>3.030301</td>\n",
|
|||
|
" <td>87987.49928</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2</th>\n",
|
|||
|
" <td>1609459380</td>\n",
|
|||
|
" <td>1/1/2021 0:03</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29037.68</td>\n",
|
|||
|
" <td>29069.39</td>\n",
|
|||
|
" <td>29019.00</td>\n",
|
|||
|
" <td>29048.13</td>\n",
|
|||
|
" <td>2.189621</td>\n",
|
|||
|
" <td>63604.38239</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>3</th>\n",
|
|||
|
" <td>1609459440</td>\n",
|
|||
|
" <td>1/1/2021 0:04</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29048.13</td>\n",
|
|||
|
" <td>29057.73</td>\n",
|
|||
|
" <td>29035.61</td>\n",
|
|||
|
" <td>29045.19</td>\n",
|
|||
|
" <td>1.446538</td>\n",
|
|||
|
" <td>42014.95943</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>4</th>\n",
|
|||
|
" <td>1609459500</td>\n",
|
|||
|
" <td>1/1/2021 0:05</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29021.86</td>\n",
|
|||
|
" <td>29023.38</td>\n",
|
|||
|
" <td>28982.33</td>\n",
|
|||
|
" <td>28999.50</td>\n",
|
|||
|
" <td>1.062360</td>\n",
|
|||
|
" <td>30807.89925</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high low close \\\n",
|
|||
|
"0 1609459260 1/1/2021 0:01 BTC/USD 29007.31 29086.90 29007.31 29083.47 \n",
|
|||
|
"1 1609459320 1/1/2021 0:02 BTC/USD 29069.80 29073.02 29028.14 29035.89 \n",
|
|||
|
"2 1609459380 1/1/2021 0:03 BTC/USD 29037.68 29069.39 29019.00 29048.13 \n",
|
|||
|
"3 1609459440 1/1/2021 0:04 BTC/USD 29048.13 29057.73 29035.61 29045.19 \n",
|
|||
|
"4 1609459500 1/1/2021 0:05 BTC/USD 29021.86 29023.38 28982.33 28999.50 \n",
|
|||
|
"\n",
|
|||
|
" Volume BTC Volume USD \n",
|
|||
|
"0 14.561951 423512.06040 \n",
|
|||
|
"1 3.030301 87987.49928 \n",
|
|||
|
"2 2.189621 63604.38239 \n",
|
|||
|
"3 1.446538 42014.95943 \n",
|
|||
|
"4 1.062360 30807.89925 "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 8,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc21.head()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "22194b16",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# Normalizacja daty i podział daty na osobne pola"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 9,
|
|||
|
"id": "16678aba",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>0</th>\n",
|
|||
|
" <td>1609459260</td>\n",
|
|||
|
" <td>2021-01-01 00:01:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29007.31</td>\n",
|
|||
|
" <td>29086.90</td>\n",
|
|||
|
" <td>29007.31</td>\n",
|
|||
|
" <td>29083.47</td>\n",
|
|||
|
" <td>14.561951</td>\n",
|
|||
|
" <td>423512.06040</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>1</th>\n",
|
|||
|
" <td>1609459320</td>\n",
|
|||
|
" <td>2021-01-01 00:02:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29069.80</td>\n",
|
|||
|
" <td>29073.02</td>\n",
|
|||
|
" <td>29028.14</td>\n",
|
|||
|
" <td>29035.89</td>\n",
|
|||
|
" <td>3.030301</td>\n",
|
|||
|
" <td>87987.49928</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2</th>\n",
|
|||
|
" <td>1609459380</td>\n",
|
|||
|
" <td>2021-01-01 00:03:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29037.68</td>\n",
|
|||
|
" <td>29069.39</td>\n",
|
|||
|
" <td>29019.00</td>\n",
|
|||
|
" <td>29048.13</td>\n",
|
|||
|
" <td>2.189621</td>\n",
|
|||
|
" <td>63604.38239</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>3</th>\n",
|
|||
|
" <td>1609459440</td>\n",
|
|||
|
" <td>2021-01-01 00:04:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29048.13</td>\n",
|
|||
|
" <td>29057.73</td>\n",
|
|||
|
" <td>29035.61</td>\n",
|
|||
|
" <td>29045.19</td>\n",
|
|||
|
" <td>1.446538</td>\n",
|
|||
|
" <td>42014.95943</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>4</th>\n",
|
|||
|
" <td>1609459500</td>\n",
|
|||
|
" <td>2021-01-01 00:05:00</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>29021.86</td>\n",
|
|||
|
" <td>29023.38</td>\n",
|
|||
|
" <td>28982.33</td>\n",
|
|||
|
" <td>28999.50</td>\n",
|
|||
|
" <td>1.062360</td>\n",
|
|||
|
" <td>30807.89925</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high low \\\n",
|
|||
|
"0 1609459260 2021-01-01 00:01:00 BTC/USD 29007.31 29086.90 29007.31 \n",
|
|||
|
"1 1609459320 2021-01-01 00:02:00 BTC/USD 29069.80 29073.02 29028.14 \n",
|
|||
|
"2 1609459380 2021-01-01 00:03:00 BTC/USD 29037.68 29069.39 29019.00 \n",
|
|||
|
"3 1609459440 2021-01-01 00:04:00 BTC/USD 29048.13 29057.73 29035.61 \n",
|
|||
|
"4 1609459500 2021-01-01 00:05:00 BTC/USD 29021.86 29023.38 28982.33 \n",
|
|||
|
"\n",
|
|||
|
" close Volume BTC Volume USD \n",
|
|||
|
"0 29083.47 14.561951 423512.06040 \n",
|
|||
|
"1 29035.89 3.030301 87987.49928 \n",
|
|||
|
"2 29048.13 2.189621 63604.38239 \n",
|
|||
|
"3 29045.19 1.446538 42014.95943 \n",
|
|||
|
"4 28999.50 1.062360 30807.89925 "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 9,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"#btc21 normalizacja daty\n",
|
|||
|
"btc21.date = pd.to_datetime(btc21['date'], format='%m/%d/%Y %H:%M')\n",
|
|||
|
"btc21.date = btc21['date'].dt.strftime('%Y-%m-%d %H:%M:%S')\n",
|
|||
|
"btc21.head()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 10,
|
|||
|
"id": "b16a5f3d",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" <th>hour</th>\n",
|
|||
|
" <th>year</th>\n",
|
|||
|
" <th>month</th>\n",
|
|||
|
" <th>day</th>\n",
|
|||
|
" <th>month of year</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>0</th>\n",
|
|||
|
" <td>1546300740</td>\n",
|
|||
|
" <td>2018-12-31</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3693.30</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3693.30</td>\n",
|
|||
|
" <td>9.838855</td>\n",
|
|||
|
" <td>36337.841473</td>\n",
|
|||
|
" <td>23:59:00</td>\n",
|
|||
|
" <td>2018</td>\n",
|
|||
|
" <td>12</td>\n",
|
|||
|
" <td>31</td>\n",
|
|||
|
" <td>2018-12</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>1</th>\n",
|
|||
|
" <td>1546300680</td>\n",
|
|||
|
" <td>2018-12-31</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3691.35</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3691.35</td>\n",
|
|||
|
" <td>0.560000</td>\n",
|
|||
|
" <td>2067.156000</td>\n",
|
|||
|
" <td>23:58:00</td>\n",
|
|||
|
" <td>2018</td>\n",
|
|||
|
" <td>12</td>\n",
|
|||
|
" <td>31</td>\n",
|
|||
|
" <td>2018-12</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2</th>\n",
|
|||
|
" <td>1546300620</td>\n",
|
|||
|
" <td>2018-12-31</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3688.83</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>3688.83</td>\n",
|
|||
|
" <td>3689.26</td>\n",
|
|||
|
" <td>0.560833</td>\n",
|
|||
|
" <td>2069.059602</td>\n",
|
|||
|
" <td>23:57:00</td>\n",
|
|||
|
" <td>2018</td>\n",
|
|||
|
" <td>12</td>\n",
|
|||
|
" <td>31</td>\n",
|
|||
|
" <td>2018-12</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>3</th>\n",
|
|||
|
" <td>1546300560</td>\n",
|
|||
|
" <td>2018-12-31</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3687.87</td>\n",
|
|||
|
" <td>3689.65</td>\n",
|
|||
|
" <td>3686.92</td>\n",
|
|||
|
" <td>3686.92</td>\n",
|
|||
|
" <td>7.610240</td>\n",
|
|||
|
" <td>28058.346208</td>\n",
|
|||
|
" <td>23:56:00</td>\n",
|
|||
|
" <td>2018</td>\n",
|
|||
|
" <td>12</td>\n",
|
|||
|
" <td>31</td>\n",
|
|||
|
" <td>2018-12</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>4</th>\n",
|
|||
|
" <td>1546300500</td>\n",
|
|||
|
" <td>2018-12-31</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>3688.28</td>\n",
|
|||
|
" <td>3688.85</td>\n",
|
|||
|
" <td>3685.00</td>\n",
|
|||
|
" <td>3688.85</td>\n",
|
|||
|
" <td>7.665703</td>\n",
|
|||
|
" <td>28277.629729</td>\n",
|
|||
|
" <td>23:55:00</td>\n",
|
|||
|
" <td>2018</td>\n",
|
|||
|
" <td>12</td>\n",
|
|||
|
" <td>31</td>\n",
|
|||
|
" <td>2018-12</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",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2149697</th>\n",
|
|||
|
" <td>1646105880</td>\n",
|
|||
|
" <td>2022-03-01</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>43077.82</td>\n",
|
|||
|
" <td>43077.82</td>\n",
|
|||
|
" <td>43049.46</td>\n",
|
|||
|
" <td>43049.46</td>\n",
|
|||
|
" <td>0.022210</td>\n",
|
|||
|
" <td>956.143143</td>\n",
|
|||
|
" <td>03:38:00</td>\n",
|
|||
|
" <td>2022</td>\n",
|
|||
|
" <td>03</td>\n",
|
|||
|
" <td>01</td>\n",
|
|||
|
" <td>2022-03</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2149698</th>\n",
|
|||
|
" <td>1646105940</td>\n",
|
|||
|
" <td>2022-03-01</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>43035.16</td>\n",
|
|||
|
" <td>43035.16</td>\n",
|
|||
|
" <td>42999.44</td>\n",
|
|||
|
" <td>42999.44</td>\n",
|
|||
|
" <td>0.820950</td>\n",
|
|||
|
" <td>35300.390270</td>\n",
|
|||
|
" <td>03:39:00</td>\n",
|
|||
|
" <td>2022</td>\n",
|
|||
|
" <td>03</td>\n",
|
|||
|
" <td>01</td>\n",
|
|||
|
" <td>2022-03</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2149699</th>\n",
|
|||
|
" <td>1646106000</td>\n",
|
|||
|
" <td>2022-03-01</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>43022.24</td>\n",
|
|||
|
" <td>43022.24</td>\n",
|
|||
|
" <td>43016.03</td>\n",
|
|||
|
" <td>43016.03</td>\n",
|
|||
|
" <td>0.009230</td>\n",
|
|||
|
" <td>397.037957</td>\n",
|
|||
|
" <td>03:40:00</td>\n",
|
|||
|
" <td>2022</td>\n",
|
|||
|
" <td>03</td>\n",
|
|||
|
" <td>01</td>\n",
|
|||
|
" <td>2022-03</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2149700</th>\n",
|
|||
|
" <td>1646106060</td>\n",
|
|||
|
" <td>2022-03-01</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>43018.23</td>\n",
|
|||
|
" <td>43046.59</td>\n",
|
|||
|
" <td>43018.23</td>\n",
|
|||
|
" <td>43046.58</td>\n",
|
|||
|
" <td>0.142977</td>\n",
|
|||
|
" <td>6154.673021</td>\n",
|
|||
|
" <td>03:41:00</td>\n",
|
|||
|
" <td>2022</td>\n",
|
|||
|
" <td>03</td>\n",
|
|||
|
" <td>01</td>\n",
|
|||
|
" <td>2022-03</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2149701</th>\n",
|
|||
|
" <td>1646106180</td>\n",
|
|||
|
" <td>2022-03-01</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>43046.58</td>\n",
|
|||
|
" <td>43046.58</td>\n",
|
|||
|
" <td>43046.58</td>\n",
|
|||
|
" <td>43046.58</td>\n",
|
|||
|
" <td>0.000000</td>\n",
|
|||
|
" <td>0.000000</td>\n",
|
|||
|
" <td>03:43:00</td>\n",
|
|||
|
" <td>2022</td>\n",
|
|||
|
" <td>03</td>\n",
|
|||
|
" <td>01</td>\n",
|
|||
|
" <td>2022-03</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"<p>2149702 rows × 14 columns</p>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high low \\\n",
|
|||
|
"0 1546300740 2018-12-31 BTC/USD 3689.26 3693.30 3689.26 \n",
|
|||
|
"1 1546300680 2018-12-31 BTC/USD 3689.26 3691.35 3689.26 \n",
|
|||
|
"2 1546300620 2018-12-31 BTC/USD 3688.83 3689.26 3688.83 \n",
|
|||
|
"3 1546300560 2018-12-31 BTC/USD 3687.87 3689.65 3686.92 \n",
|
|||
|
"4 1546300500 2018-12-31 BTC/USD 3688.28 3688.85 3685.00 \n",
|
|||
|
"... ... ... ... ... ... ... \n",
|
|||
|
"2149697 1646105880 2022-03-01 BTC/USD 43077.82 43077.82 43049.46 \n",
|
|||
|
"2149698 1646105940 2022-03-01 BTC/USD 43035.16 43035.16 42999.44 \n",
|
|||
|
"2149699 1646106000 2022-03-01 BTC/USD 43022.24 43022.24 43016.03 \n",
|
|||
|
"2149700 1646106060 2022-03-01 BTC/USD 43018.23 43046.59 43018.23 \n",
|
|||
|
"2149701 1646106180 2022-03-01 BTC/USD 43046.58 43046.58 43046.58 \n",
|
|||
|
"\n",
|
|||
|
" close Volume BTC Volume USD hour year month day \\\n",
|
|||
|
"0 3693.30 9.838855 36337.841473 23:59:00 2018 12 31 \n",
|
|||
|
"1 3691.35 0.560000 2067.156000 23:58:00 2018 12 31 \n",
|
|||
|
"2 3689.26 0.560833 2069.059602 23:57:00 2018 12 31 \n",
|
|||
|
"3 3686.92 7.610240 28058.346208 23:56:00 2018 12 31 \n",
|
|||
|
"4 3688.85 7.665703 28277.629729 23:55:00 2018 12 31 \n",
|
|||
|
"... ... ... ... ... ... ... .. \n",
|
|||
|
"2149697 43049.46 0.022210 956.143143 03:38:00 2022 03 01 \n",
|
|||
|
"2149698 42999.44 0.820950 35300.390270 03:39:00 2022 03 01 \n",
|
|||
|
"2149699 43016.03 0.009230 397.037957 03:40:00 2022 03 01 \n",
|
|||
|
"2149700 43046.58 0.142977 6154.673021 03:41:00 2022 03 01 \n",
|
|||
|
"2149701 43046.58 0.000000 0.000000 03:43:00 2022 03 01 \n",
|
|||
|
"\n",
|
|||
|
" month of year \n",
|
|||
|
"0 2018-12 \n",
|
|||
|
"1 2018-12 \n",
|
|||
|
"2 2018-12 \n",
|
|||
|
"3 2018-12 \n",
|
|||
|
"4 2018-12 \n",
|
|||
|
"... ... \n",
|
|||
|
"2149697 2022-03 \n",
|
|||
|
"2149698 2022-03 \n",
|
|||
|
"2149699 2022-03 \n",
|
|||
|
"2149700 2022-03 \n",
|
|||
|
"2149701 2022-03 \n",
|
|||
|
"\n",
|
|||
|
"[2149702 rows x 14 columns]"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 10,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_all = pd.concat([btc18, btc19, btc20, btc21], ignore_index=True)\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"btc_all[['date', 'hour']] = btc_all['date'].str.split(' ', expand=True)\n",
|
|||
|
"btc_all[['year', 'month', 'day']] = btc_all['date'].str.split('-', expand=True)\n",
|
|||
|
"btc_all['month of year'] = btc_all['year'] + '-' + btc_all['month']\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"btc_all"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "c0265202",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"Statyskyki btc_all"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 11,
|
|||
|
"id": "a7ec8594",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" <th>hour</th>\n",
|
|||
|
" <th>year</th>\n",
|
|||
|
" <th>month</th>\n",
|
|||
|
" <th>day</th>\n",
|
|||
|
" <th>month of year</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>count</th>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2.149702e+06</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>unique</th>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1495</td>\n",
|
|||
|
" <td>1</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1440</td>\n",
|
|||
|
" <td>5</td>\n",
|
|||
|
" <td>12</td>\n",
|
|||
|
" <td>31</td>\n",
|
|||
|
" <td>51</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>top</th>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2018-12-31</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>00:34:00</td>\n",
|
|||
|
" <td>2018</td>\n",
|
|||
|
" <td>01</td>\n",
|
|||
|
" <td>22</td>\n",
|
|||
|
" <td>2018-12</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>freq</th>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1440</td>\n",
|
|||
|
" <td>2149702</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1494</td>\n",
|
|||
|
" <td>525599</td>\n",
|
|||
|
" <td>223196</td>\n",
|
|||
|
" <td>72000</td>\n",
|
|||
|
" <td>44640</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>mean</th>\n",
|
|||
|
" <td>1.579945e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1.920786e+04</td>\n",
|
|||
|
" <td>1.921931e+04</td>\n",
|
|||
|
" <td>1.919615e+04</td>\n",
|
|||
|
" <td>1.920790e+04</td>\n",
|
|||
|
" <td>5.443650e+00</td>\n",
|
|||
|
" <td>7.797241e+04</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>std</th>\n",
|
|||
|
" <td>3.808436e+07</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1.811668e+04</td>\n",
|
|||
|
" <td>1.812675e+04</td>\n",
|
|||
|
" <td>1.810635e+04</td>\n",
|
|||
|
" <td>1.811686e+04</td>\n",
|
|||
|
" <td>1.491300e+01</td>\n",
|
|||
|
" <td>2.183400e+05</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>min</th>\n",
|
|||
|
" <td>1.514765e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>3.124450e+03</td>\n",
|
|||
|
" <td>3.131860e+03</td>\n",
|
|||
|
" <td>3.122280e+03</td>\n",
|
|||
|
" <td>3.124450e+03</td>\n",
|
|||
|
" <td>0.000000e+00</td>\n",
|
|||
|
" <td>0.000000e+00</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>25%</th>\n",
|
|||
|
" <td>1.547010e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>7.135640e+03</td>\n",
|
|||
|
" <td>7.139850e+03</td>\n",
|
|||
|
" <td>7.131500e+03</td>\n",
|
|||
|
" <td>7.135792e+03</td>\n",
|
|||
|
" <td>2.380776e-01</td>\n",
|
|||
|
" <td>2.900109e+03</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>50%</th>\n",
|
|||
|
" <td>1.579256e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>9.528370e+03</td>\n",
|
|||
|
" <td>9.533685e+03</td>\n",
|
|||
|
" <td>9.523120e+03</td>\n",
|
|||
|
" <td>9.528510e+03</td>\n",
|
|||
|
" <td>1.304600e+00</td>\n",
|
|||
|
" <td>1.711807e+04</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>75%</th>\n",
|
|||
|
" <td>1.613861e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>3.454626e+04</td>\n",
|
|||
|
" <td>3.457261e+04</td>\n",
|
|||
|
" <td>3.451898e+04</td>\n",
|
|||
|
" <td>3.454637e+04</td>\n",
|
|||
|
" <td>4.802350e+00</td>\n",
|
|||
|
" <td>6.629355e+04</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>max</th>\n",
|
|||
|
" <td>1.646106e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>6.900000e+04</td>\n",
|
|||
|
" <td>6.900000e+04</td>\n",
|
|||
|
" <td>6.879999e+04</td>\n",
|
|||
|
" <td>6.900000e+04</td>\n",
|
|||
|
" <td>1.098349e+03</td>\n",
|
|||
|
" <td>1.396792e+07</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high \\\n",
|
|||
|
"count 2.149702e+06 2149702 2149702 2.149702e+06 2.149702e+06 \n",
|
|||
|
"unique NaN 1495 1 NaN NaN \n",
|
|||
|
"top NaN 2018-12-31 BTC/USD NaN NaN \n",
|
|||
|
"freq NaN 1440 2149702 NaN NaN \n",
|
|||
|
"mean 1.579945e+09 NaN NaN 1.920786e+04 1.921931e+04 \n",
|
|||
|
"std 3.808436e+07 NaN NaN 1.811668e+04 1.812675e+04 \n",
|
|||
|
"min 1.514765e+09 NaN NaN 3.124450e+03 3.131860e+03 \n",
|
|||
|
"25% 1.547010e+09 NaN NaN 7.135640e+03 7.139850e+03 \n",
|
|||
|
"50% 1.579256e+09 NaN NaN 9.528370e+03 9.533685e+03 \n",
|
|||
|
"75% 1.613861e+09 NaN NaN 3.454626e+04 3.457261e+04 \n",
|
|||
|
"max 1.646106e+09 NaN NaN 6.900000e+04 6.900000e+04 \n",
|
|||
|
"\n",
|
|||
|
" low close Volume BTC Volume USD hour \\\n",
|
|||
|
"count 2.149702e+06 2.149702e+06 2.149702e+06 2.149702e+06 2149702 \n",
|
|||
|
"unique NaN NaN NaN NaN 1440 \n",
|
|||
|
"top NaN NaN NaN NaN 00:34:00 \n",
|
|||
|
"freq NaN NaN NaN NaN 1494 \n",
|
|||
|
"mean 1.919615e+04 1.920790e+04 5.443650e+00 7.797241e+04 NaN \n",
|
|||
|
"std 1.810635e+04 1.811686e+04 1.491300e+01 2.183400e+05 NaN \n",
|
|||
|
"min 3.122280e+03 3.124450e+03 0.000000e+00 0.000000e+00 NaN \n",
|
|||
|
"25% 7.131500e+03 7.135792e+03 2.380776e-01 2.900109e+03 NaN \n",
|
|||
|
"50% 9.523120e+03 9.528510e+03 1.304600e+00 1.711807e+04 NaN \n",
|
|||
|
"75% 3.451898e+04 3.454637e+04 4.802350e+00 6.629355e+04 NaN \n",
|
|||
|
"max 6.879999e+04 6.900000e+04 1.098349e+03 1.396792e+07 NaN \n",
|
|||
|
"\n",
|
|||
|
" year month day month of year \n",
|
|||
|
"count 2149702 2149702 2149702 2149702 \n",
|
|||
|
"unique 5 12 31 51 \n",
|
|||
|
"top 2018 01 22 2018-12 \n",
|
|||
|
"freq 525599 223196 72000 44640 \n",
|
|||
|
"mean NaN NaN NaN NaN \n",
|
|||
|
"std NaN NaN NaN NaN \n",
|
|||
|
"min NaN NaN NaN NaN \n",
|
|||
|
"25% NaN NaN NaN NaN \n",
|
|||
|
"50% NaN NaN NaN NaN \n",
|
|||
|
"75% NaN NaN NaN NaN \n",
|
|||
|
"max NaN NaN NaN NaN "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 11,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_all.describe(include='all')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 44,
|
|||
|
"id": "4411cad9",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"#podział na podzbiory i zapis do plików\n",
|
|||
|
"from sklearn.model_selection import train_test_split\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"train_dev, btc_test = train_test_split(btc_all, test_size=0.2, random_state=42)\n",
|
|||
|
"btc_train, btc_dev = train_test_split(train_dev, test_size=0.25, random_state=42) \n",
|
|||
|
"\n",
|
|||
|
"\n",
|
|||
|
"btc_train.to_csv('data/btc_train.csv', index=False)\n",
|
|||
|
"btc_dev.to_csv('data/btc_dev.csv', index=False)\n",
|
|||
|
"btc_test.to_csv('data/btc_test.csv', index=False)"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 1,
|
|||
|
"id": "9f45695e",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"#zaladowanie btc_dev\n",
|
|||
|
"import pandas as pd\n",
|
|||
|
"\n",
|
|||
|
"btc_dev = pd.read_csv('data/btc_dev.csv')\n",
|
|||
|
"btc_train = pd.read_csv('data/btc_train.csv')\n",
|
|||
|
"btc_test = pd.read_csv('data/btc_test.csv')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "887def8d",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# Dane o zbiorach"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 10,
|
|||
|
"id": "58cfce99",
|
|||
|
"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>unix</th>\n",
|
|||
|
" <th>date</th>\n",
|
|||
|
" <th>symbol</th>\n",
|
|||
|
" <th>open</th>\n",
|
|||
|
" <th>high</th>\n",
|
|||
|
" <th>low</th>\n",
|
|||
|
" <th>close</th>\n",
|
|||
|
" <th>Volume BTC</th>\n",
|
|||
|
" <th>Volume USD</th>\n",
|
|||
|
" <th>hour</th>\n",
|
|||
|
" <th>year</th>\n",
|
|||
|
" <th>month</th>\n",
|
|||
|
" <th>day</th>\n",
|
|||
|
" <th>month of year</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>count</th>\n",
|
|||
|
" <td>4.299410e+05</td>\n",
|
|||
|
" <td>429941</td>\n",
|
|||
|
" <td>429941</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>4.299410e+05</td>\n",
|
|||
|
" <td>429941</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941.000000</td>\n",
|
|||
|
" <td>429941</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>unique</th>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1495</td>\n",
|
|||
|
" <td>1</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1440</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>51</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>top</th>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2021-09-25</td>\n",
|
|||
|
" <td>BTC/USD</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>12:13:00</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2021-10</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>freq</th>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>338</td>\n",
|
|||
|
" <td>429941</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>352</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>9032</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>mean</th>\n",
|
|||
|
" <td>1.579897e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>19187.806679</td>\n",
|
|||
|
" <td>19199.224871</td>\n",
|
|||
|
" <td>19176.132847</td>\n",
|
|||
|
" <td>19187.853331</td>\n",
|
|||
|
" <td>5.432500</td>\n",
|
|||
|
" <td>7.764623e+04</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2019.588653</td>\n",
|
|||
|
" <td>6.229801</td>\n",
|
|||
|
" <td>15.708069</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>std</th>\n",
|
|||
|
" <td>3.806220e+07</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>18110.655080</td>\n",
|
|||
|
" <td>18120.678529</td>\n",
|
|||
|
" <td>18100.353208</td>\n",
|
|||
|
" <td>18110.821598</td>\n",
|
|||
|
" <td>14.749560</td>\n",
|
|||
|
" <td>2.193092e+05</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>1.206519</td>\n",
|
|||
|
" <td>3.472108</td>\n",
|
|||
|
" <td>8.788119</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>min</th>\n",
|
|||
|
" <td>1.514765e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>3137.000000</td>\n",
|
|||
|
" <td>3137.000000</td>\n",
|
|||
|
" <td>3130.000000</td>\n",
|
|||
|
" <td>3135.440000</td>\n",
|
|||
|
" <td>0.000000</td>\n",
|
|||
|
" <td>0.000000e+00</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2018.000000</td>\n",
|
|||
|
" <td>1.000000</td>\n",
|
|||
|
" <td>1.000000</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>25%</th>\n",
|
|||
|
" <td>1.547001e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>7138.650000</td>\n",
|
|||
|
" <td>7142.470000</td>\n",
|
|||
|
" <td>7134.340000</td>\n",
|
|||
|
" <td>7138.440000</td>\n",
|
|||
|
" <td>0.237175</td>\n",
|
|||
|
" <td>2.898257e+03</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2019.000000</td>\n",
|
|||
|
" <td>3.000000</td>\n",
|
|||
|
" <td>8.000000</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>50%</th>\n",
|
|||
|
" <td>1.579157e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>9526.480000</td>\n",
|
|||
|
" <td>9531.510000</td>\n",
|
|||
|
" <td>9521.470000</td>\n",
|
|||
|
" <td>9526.910000</td>\n",
|
|||
|
" <td>1.304891</td>\n",
|
|||
|
" <td>1.712750e+04</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2020.000000</td>\n",
|
|||
|
" <td>6.000000</td>\n",
|
|||
|
" <td>16.000000</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>75%</th>\n",
|
|||
|
" <td>1.613801e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>34472.350000</td>\n",
|
|||
|
" <td>34500.000000</td>\n",
|
|||
|
" <td>34450.000000</td>\n",
|
|||
|
" <td>34476.160000</td>\n",
|
|||
|
" <td>4.811006</td>\n",
|
|||
|
" <td>6.621286e+04</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2021.000000</td>\n",
|
|||
|
" <td>9.000000</td>\n",
|
|||
|
" <td>23.000000</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>max</th>\n",
|
|||
|
" <td>1.646106e+09</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>68794.750000</td>\n",
|
|||
|
" <td>68894.100000</td>\n",
|
|||
|
" <td>68704.410000</td>\n",
|
|||
|
" <td>68733.680000</td>\n",
|
|||
|
" <td>778.854848</td>\n",
|
|||
|
" <td>1.378306e+07</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" <td>2022.000000</td>\n",
|
|||
|
" <td>12.000000</td>\n",
|
|||
|
" <td>31.000000</td>\n",
|
|||
|
" <td>NaN</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" unix date symbol open high \\\n",
|
|||
|
"count 4.299410e+05 429941 429941 429941.000000 429941.000000 \n",
|
|||
|
"unique NaN 1495 1 NaN NaN \n",
|
|||
|
"top NaN 2021-09-25 BTC/USD NaN NaN \n",
|
|||
|
"freq NaN 338 429941 NaN NaN \n",
|
|||
|
"mean 1.579897e+09 NaN NaN 19187.806679 19199.224871 \n",
|
|||
|
"std 3.806220e+07 NaN NaN 18110.655080 18120.678529 \n",
|
|||
|
"min 1.514765e+09 NaN NaN 3137.000000 3137.000000 \n",
|
|||
|
"25% 1.547001e+09 NaN NaN 7138.650000 7142.470000 \n",
|
|||
|
"50% 1.579157e+09 NaN NaN 9526.480000 9531.510000 \n",
|
|||
|
"75% 1.613801e+09 NaN NaN 34472.350000 34500.000000 \n",
|
|||
|
"max 1.646106e+09 NaN NaN 68794.750000 68894.100000 \n",
|
|||
|
"\n",
|
|||
|
" low close Volume BTC Volume USD hour \\\n",
|
|||
|
"count 429941.000000 429941.000000 429941.000000 4.299410e+05 429941 \n",
|
|||
|
"unique NaN NaN NaN NaN 1440 \n",
|
|||
|
"top NaN NaN NaN NaN 12:13:00 \n",
|
|||
|
"freq NaN NaN NaN NaN 352 \n",
|
|||
|
"mean 19176.132847 19187.853331 5.432500 7.764623e+04 NaN \n",
|
|||
|
"std 18100.353208 18110.821598 14.749560 2.193092e+05 NaN \n",
|
|||
|
"min 3130.000000 3135.440000 0.000000 0.000000e+00 NaN \n",
|
|||
|
"25% 7134.340000 7138.440000 0.237175 2.898257e+03 NaN \n",
|
|||
|
"50% 9521.470000 9526.910000 1.304891 1.712750e+04 NaN \n",
|
|||
|
"75% 34450.000000 34476.160000 4.811006 6.621286e+04 NaN \n",
|
|||
|
"max 68704.410000 68733.680000 778.854848 1.378306e+07 NaN \n",
|
|||
|
"\n",
|
|||
|
" year month day month of year \n",
|
|||
|
"count 429941.000000 429941.000000 429941.000000 429941 \n",
|
|||
|
"unique NaN NaN NaN 51 \n",
|
|||
|
"top NaN NaN NaN 2021-10 \n",
|
|||
|
"freq NaN NaN NaN 9032 \n",
|
|||
|
"mean 2019.588653 6.229801 15.708069 NaN \n",
|
|||
|
"std 1.206519 3.472108 8.788119 NaN \n",
|
|||
|
"min 2018.000000 1.000000 1.000000 NaN \n",
|
|||
|
"25% 2019.000000 3.000000 8.000000 NaN \n",
|
|||
|
"50% 2020.000000 6.000000 16.000000 NaN \n",
|
|||
|
"75% 2021.000000 9.000000 23.000000 NaN \n",
|
|||
|
"max 2022.000000 12.000000 31.000000 NaN "
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 10,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_dev.describe(include='all')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": null,
|
|||
|
"id": "75cbb3d3",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"btc_train.describe(include='all')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": null,
|
|||
|
"id": "ea7d4766",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"btc_test.describe(include='all')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 45,
|
|||
|
"id": "7313bfb5",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"Volume BTC\n",
|
|||
|
"0.000000 10353\n",
|
|||
|
"1.000000 239\n",
|
|||
|
"0.010000 160\n",
|
|||
|
"0.001000 153\n",
|
|||
|
"2.000000 131\n",
|
|||
|
" ... \n",
|
|||
|
"5.190947 1\n",
|
|||
|
"0.529028 1\n",
|
|||
|
"10.358122 1\n",
|
|||
|
"3.810011 1\n",
|
|||
|
"0.062389 1\n",
|
|||
|
"Name: count, Length: 410603, dtype: int64"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 45,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_dev['Volume BTC'].value_counts()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 12,
|
|||
|
"id": "71aed382",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"<Axes: xlabel='year'>"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 12,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
},
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAHJCAYAAABkJibBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAtDElEQVR4nO3de3zMd77H8XcmkRtSpHLpqtahBMc1kiNdUatWWy0eLu0W0TZuQa0uRVfZVZSlUpS61n1R5URZqy3V057eBElve5bwiLtWxC3ikotk5vxhMydzqGo6yfwy39fz8djHyvf7/X3z+f0+88i+d+Y3Mz4Oh8MhAAAAg9k8XQAAAICnEYgAAIDxCEQAAMB4BCIAAGA8AhEAADAegQgAABiPQAQAAIxHIAIAAMYjEAEAAOP5ebqAysLhcMhur/wf6m2z+XjFeXgDemEd9MI66IW1VPZ+2Gw+8vHxuaO1BKI7ZLc7dOHCVU+X8Yv4+dlUs2ZV5eZeU1GR3dPlGI1eWAe9sA56YS3e0I9atarK1/fOAhEvmQEAAOMRiAAAgPEIRAAAwHgEIgAAYDwCEQAAMB6BCAAAGI9ABAAAjEcgAgAAxiMQAQAA4xGIAACA8QhEAADAeAQiAABgPAIRAAAwHoEIAAAYz8/TBeD/2Gw+stl8ym1/X1+by3+XF7vdIbvdUa6/AwAAdyIQWYTN5qMaNYLLPaxIUkhIULnuX1xsV07OtUodiginAGAWApFF2Gw+8vW1KXlduk6duezpcsqsTnh1jekXLZvNp9L+DzHh1FoIpwAqAoHIYk6duazD31/ydBlGI5xaB+EUQEUhEAE/gnDqeYRTABWFQATA8ginAMobb7sHAADGIxABAADjEYgAAIDxCEQAAMB4BCIAAGA8AhEAADAegQgAABiPQAQAAIz3iwLRkiVL1L9/f5exAwcOKCEhQS1btlTHjh21Zs0al3m73a558+YpPj5eLVu21ODBg3Xy5MkK3wMAAKBEmQPRunXrNHfuXJexixcvKjExUXXr1lVKSoqef/55JScnKyUlxblm4cKFWr9+vaZOnaoNGzbIbrdr0KBBKiwsrNA9AAAASvzsr+44c+aMJk2apD179uj+++93mdu4caOqVKmiKVOmyM/PT/Xr19fx48e1dOlS9erVS4WFhVqxYoXGjBmjDh06SJLmzJmj+Ph47dy5U0888USF7AEAAFDaz36G6J///KeqVKmiv/3tb2rRooXLXFpammJjY+Xn9385q23btjp27JjOnTunjIwMXb16VXFxcc75kJAQNWnSRPv27auwPQAAAEr72c8QdezYUR07drzlXFZWlho2bOgyFhYWJkk6ffq0srKyJEmRkZE3rSmZq4g97r777js405v5+ZXfPei+vt51f3tlPp/KXPutVObzqcy134q3nY+7lVwfrpM1mNYPt37bfX5+vvz9/V3GAgICJEkFBQXKy8uTpFuuuXTpUoXtURY2m49q1qxapmNNFBIS5OkS8C/0wjroxZ3hOlmLKf1wayAKDAx03thcoiSABAcHKzAwUJJUWFjo/HfJmqCgoArboyzsdodyc6+V6dg74etr86oHXW5unoqL7Z4uo0zohXXQC7OU9JvrZA3e0I+QkKA7fobLrYEoIiJC2dnZLmMlP4eHh6uoqMg5VrduXZc1jRo1qrA9yqqoqHI+IDyhuNjO9bIIemEd9OLOcJ2sxZR+uPWFwZiYGKWnp6u4uNg5lpqaqnr16ik0NFRRUVGqVq2a9uzZ45zPzc3V/v37FRMTU2F7AAAAlObWQNSrVy9duXJFEyZMUGZmpjZv3qxVq1YpKSlJ0o37fhISEpScnKyPPvpIGRkZGjVqlCIiItS5c+cK2wMAAKA0t75kFhoaqmXLlmnatGnq0aOHateurXHj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<Figure size 640x480 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_dev['year'].value_counts().plot(kind='bar')"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 13,
|
|||
|
"id": "ce845b8b",
|
|||
|
"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>high</th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>year</th>\n",
|
|||
|
" <th></th>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </thead>\n",
|
|||
|
" <tbody>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2018</th>\n",
|
|||
|
" <td>7533.899647</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2019</th>\n",
|
|||
|
" <td>7355.831382</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2020</th>\n",
|
|||
|
" <td>10418.525729</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2021</th>\n",
|
|||
|
" <td>47402.209955</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" <tr>\n",
|
|||
|
" <th>2022</th>\n",
|
|||
|
" <td>40931.761356</td>\n",
|
|||
|
" </tr>\n",
|
|||
|
" </tbody>\n",
|
|||
|
"</table>\n",
|
|||
|
"</div>"
|
|||
|
],
|
|||
|
"text/plain": [
|
|||
|
" high\n",
|
|||
|
"year \n",
|
|||
|
"2018 7533.899647\n",
|
|||
|
"2019 7355.831382\n",
|
|||
|
"2020 10418.525729\n",
|
|||
|
"2021 47402.209955\n",
|
|||
|
"2022 40931.761356"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 13,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_dev[[\"high\", \"year\"]].groupby(\"year\").mean()"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 14,
|
|||
|
"id": "cc621e61",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"<Axes: xlabel='year'>"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 14,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
},
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAkQAAAHJCAYAAABkJibBAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA91UlEQVR4nO3de1yUZf7/8TfDcFJBgeRQ5OFrKVoqHnCxlXKtzLL0a1qbilumhplRmlmttGWmm0nqqpnn1MKoVtP6Wmm126/aBJUO7mZampaWgCaKBw4yM78//DJfJ60IB+Zmrtfz8fCh3Nd1X1z3fO7BN/dc90yAy+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CAwMlCRVVJT7eCaoT8rLT58vgYHc2wAAvsZPYi+w2QIVFtZIx4+f/kiI4OCQn/0cLl9zOgPkcHBlwpdcLpcqKsp18uRRNWwYLpuN30sAwNcIRF4SEXH6s62qQpFV2Ww2OZ318w22/E10dJRCQyMIqABgAQQiLwkICFDjxtEKD4+Uw1Hp6+mcU2BggBo3bqCjR0/yn7CPhYQEKTo6QsXFJ8RaIgDwPQKRl9lsNtls1vwYBrvdptDQUJWWOurt27D7C14mAwBrOa+fygsXLtSwYcN+tj0zM1O9enl+MKjT6dScOXOUmpqqpKQkjRo1Svv27fPo8+WXXyotLU1JSUnq1auXVq5c6fUxAAAAqtQ4EGVnZ2v27Nk/2/7uu+/q1VdfPWv7/PnztWrVKk2ZMkU5OTlyOp0aOXKkKioqJEnFxcUaPny
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 640x480 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"btc_dev[[\"Volume USD\", \"year\"]].groupby(\"year\").mean().plot(kind=\"bar\")"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 15,
|
|||
|
"id": "40752870",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"text/plain": [
|
|||
|
"<seaborn.axisgrid.FacetGrid at 0x2758607bed0>"
|
|||
|
]
|
|||
|
},
|
|||
|
"execution_count": 15,
|
|||
|
"metadata": {},
|
|||
|
"output_type": "execute_result"
|
|||
|
},
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjYAAAHkCAYAAAAtqGWMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXB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vqgU1ADs3bCPo7uPYwkN0tW/oH4iAhuB4BcUKYCrqIQjOw9zct9JUrenknkkA8nn4TfCqAJBvcBgNnLB5YOrtTVu2QhbqFVXKZmTB9Nq7OC97od1lBWWVWsTCH4PsRUlEFC+UuMqslOUV8Kedfs4tuc4tjArvS7qiYZGdGIU6NwQUCA42yiqQvdhXfH7/KycvRqv24skSbTr3YZxt40FSdI1qM9Nz63R5nK48ft84u1b8KcRgY1AAMgBP0W5xXz7xmyGXXkBg8cPwOv1sW7+Bo7tOc6oG0eiGoxCCFVQr/C43Jw6lEZ+Zj5XPzIFDVBVhcM7j7B63jr6j+mrq/+k1o1rtIVFh6IaxCNK8OcRV41AAHjdHjKOZ3LFvZcz7735pB9Oxxxkot+YvnQd0gV7kZ3Y8BBcLn27HQsEZxOv28uC6YsoyCok/chpYhrFYC+2c/LAKQB6juiuq//oxCiiEiLJy8ivYrtw6nCMFhNe8TIh+JOIVT6BAACJhGbxvP3Ae6QfTgfKl8KXz/qZ796Yg8VqxmIRFRqC+oXX40NRFe554w6GTx5GcISNDv3ac987d9N5UCeyT2br6v/43uPc/PwNtOzaomLMYjNz2e2XEt80Dpfdqat/Qf1ErNgIBAASzHn7e7Rq9pqO7zuB0y6EwgT
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 588.875x500 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
},
|
|||
|
{
|
|||
|
"data": {
|
|||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAjYAAAHkCAYAAAAtqGWMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjguMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/H5lhTAAAACXBIWXMAAA9hAAAPYQGoP6dpAAEAAElEQVR4nOydd3gVZfq/72mnp3d6Cb33jnQQAUGqiCgWLGtb+66uq27R1V3L2gtgF0UFVEAE6b1I7y2hJaSXk9PPzO+P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MTYCAaCqMoY/iN/jZ8HM78hIy8Ri1eg1sidterVCCgdA0qp6NwWCC0ooECKhTgK3/G0a3767kMz0M7iinPSb0I8WnZuhh3VTC/RFJ1Qev2OxW5DN7OcgqLYIYSMQAKoMWTkFFGQXMvr2kZQUebDYLEiSxNoF6+gzqjeSLJXFAQgE1YGAL8iBrQdJqBXPFWP74oxyEvQH8JX4yTmVQ0KdeMC8lO96zetisVsIVLDk1G1oFyxWC6KKjeDXIoSNQACEgyHsDhuHThzm0+c+w+/1A9CwVQMmPTCegDdAZKKTkhIxNS6oPhgY2J02Vny5iivG9sXmsKJZVHat3YMeDjNgYn9zd0CHaU9M5YN/fITX7SsbbtGlGd2v7CZeJAS/CSFsBAJAliQObT/CgpmLyo0f25PGm4++wx/+fQcWi0JJSRXtoEBgArIsI0kS3a/sxrw3vsbv8QES3YZ1oU2v1mg2c5dfM9IzSK6fxHWPTsbn9lFSVEJC7XiCgSChUIigP4CiiiVgwa9DCBuBAPB5fCz
|
|||
|
"text/plain": [
|
|||
|
"<Figure size 588.875x500 with 1 Axes>"
|
|||
|
]
|
|||
|
},
|
|||
|
"metadata": {},
|
|||
|
"output_type": "display_data"
|
|||
|
}
|
|||
|
],
|
|||
|
"source": [
|
|||
|
"import seaborn as sns\n",
|
|||
|
"sns.set_theme()\n",
|
|||
|
"sns.relplot(data=btc_dev, x=\"month\", y=\"open\", hue=\"year\")\n",
|
|||
|
"sns.relplot(data=btc_dev, x=\"month\", y=\"close\", hue=\"year\")"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": null,
|
|||
|
"id": "3a9384ad",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"btc_dev_v = btc_dev[btc_dev[\"year\"] != \"2022\"]\n",
|
|||
|
"sns.relplot(data=btc_dev_v, x=\"month\", y=\"close\", hue=\"year\")"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "code",
|
|||
|
"execution_count": 8,
|
|||
|
"id": "4dffab95",
|
|||
|
"metadata": {},
|
|||
|
"outputs": [],
|
|||
|
"source": [
|
|||
|
"import seaborn as sns\n",
|
|||
|
"sns.set_theme()\n",
|
|||
|
"sns.pairplot(data=btc_dev.drop(columns=[\"unix\"]), hue=\"year\")"
|
|||
|
]
|
|||
|
},
|
|||
|
{
|
|||
|
"cell_type": "markdown",
|
|||
|
"id": "1a7c2c6f",
|
|||
|
"metadata": {},
|
|||
|
"source": [
|
|||
|
"# Czyszczenie\n",
|
|||
|
"\n",
|
|||
|
"Dane wydają się być czyste, nie widzę potrzeby ich czyszczenia"
|
|||
|
]
|
|||
|
}
|
|||
|
],
|
|||
|
"metadata": {
|
|||
|
"kernelspec": {
|
|||
|
"display_name": "Python 3",
|
|||
|
"language": "python",
|
|||
|
"name": "python3"
|
|||
|
},
|
|||
|
"language_info": {
|
|||
|
"codemirror_mode": {
|
|||
|
"name": "ipython",
|
|||
|
"version": 3
|
|||
|
},
|
|||
|
"file_extension": ".py",
|
|||
|
"mimetype": "text/x-python",
|
|||
|
"name": "python",
|
|||
|
"nbconvert_exporter": "python",
|
|||
|
"pygments_lexer": "ipython3",
|
|||
|
"version": "3.11.8"
|
|||
|
}
|
|||
|
},
|
|||
|
"nbformat": 4,
|
|||
|
"nbformat_minor": 5
|
|||
|
}
|