В файле содержатся данные о котировках контракта SPFB.RTS-12.18 (RIZ8) с минутным интервалом. В файле присутствуют следующие поля:

            <DATE> Дата проведения торгов
            <TIME> Время, соответствующее началу минутного интервала
            <OPEN> Цена открытия, т.е. цена первой сделки
            <HIGH> Максимальная цена сделки за выбранный интервал
            <LOW> Минимальная цена сделки за выбранный интервал
            <CLOSE> Цена закрытия, т.е. цена последней сделки
            <VOL> Объем торгов за выбранный интервал

Преобразуйте эти данные к часовым интервалам и постройте график «японские свечи» для даты 25 сентября.
```
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "pT2g3peN3l9y"
      },
      "source": [
        "В этом блокноте мы научимся строить график японских свечей.\n",
        "\n",
        "Для начала подключаем библиотеку pandas и загружаем интересующий нас [файл](https://studio.openedu.ru/assets/courseware/v1/824fccdb3e15cab129049a536ece5500/asset-v1:ITMOUniversity+DATANTECH2035+fall_2021+type@asset+block/SPFB.RTS-12.18_180901_181231.csv) при помощи метода `read_csv(file_name, delimeter, index_col, decimal, usecols, header, ...)`. Подробное описание можно найти по [ссылке](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html)."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "X4UgycQ-29JL"
      },
      "source": [
        "import pandas as pd\n",
        "data = pd.read_csv('https://dc-edu.itmo.ru/assets/courseware/v1/824fccdb3e15cab129049a536ece5500/asset-v1:ITMO+AGR_IT+2024_fall+type@asset+block/SPFB.RTS-12.18_180901_181231.csv',\n",
        "                       delimiter=',',\n",
        "                       decimal='.')"
      ],
      "execution_count": 1,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "-LSi2YnX3z4O"
      },
      "source": [
        " Посмотрим на наши данные. Похоже, они загрузились правильно."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "id": "lr7GOIgi324h",
        "outputId": "f788fe3f-d3d4-473e-bce0-adc83190c497"
      },
      "source": [
        "data.head()"
      ],
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "         <TICKER>  <PER>    <DATE> <TIME>    <OPEN>    <HIGH>     <LOW>  \\\n",
              "0  SPFB.RTS-12.18      1  03/09/18  10:01  107900.0  108060.0  107900.0   \n",
              "1  SPFB.RTS-12.18      1  03/09/18  10:02  107960.0  107960.0  107960.0   \n",
              "2  SPFB.RTS-12.18      1  03/09/18  10:04  108000.0  108000.0  108000.0   \n",
              "3  SPFB.RTS-12.18      1  03/09/18  10:05  108000.0  108000.0  108000.0   \n",
              "4  SPFB.RTS-12.18      1  03/09/18  10:08  108080.0  108080.0  108080.0   \n",
              "\n",
              "    <CLOSE>  <VOL>  \n",
              "0  108030.0      3  \n",
              "1  107960.0      5  \n",
              "2  108000.0      8  \n",
              "3  108000.0      1  \n",
              "4  108080.0      1  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-de2d761a-1d44-4d74-95ea-f53ff61200d5\" class=\"colab-df-container\">\n",
              "    <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>&lt;TICKER&gt;</th>\n",
              "      <th>&lt;PER&gt;</th>\n",
              "      <th>&lt;DATE&gt;</th>\n",
              "      <th>&lt;TIME&gt;</th>\n",
              "      <th>&lt;OPEN&gt;</th>\n",
              "      <th>&lt;HIGH&gt;</th>\n",
              "      <th>&lt;LOW&gt;</th>\n",
              "      <th>&lt;CLOSE&gt;</th>\n",
              "      <th>&lt;VOL&gt;</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:01</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108060.0</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108030.0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:02</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>5</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:04</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>8</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:05</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:08</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-de2d761a-1d44-4d74-95ea-f53ff61200d5')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-de2d761a-1d44-4d74-95ea-f53ff61200d5 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-de2d761a-1d44-4d74-95ea-f53ff61200d5');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-abed5fd4-a111-4b6f-9452-21a982b38290\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-abed5fd4-a111-4b6f-9452-21a982b38290')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-abed5fd4-a111-4b6f-9452-21a982b38290 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "data",
              "summary": "{\n  \"name\": \"data\",\n  \"rows\": 58970,\n  \"fields\": [\n    {\n      \"column\": \"<TICKER>\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"SPFB.RTS-12.18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<PER>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 1,\n        \"max\": 1,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<DATE>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 78,\n        \"samples\": [\n          \"18/10/18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<TIME>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 811,\n        \"samples\": [\n          \"16:52\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<OPEN>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.668837539208,\n        \"min\": 102960.0,\n        \"max\": 119240.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106260.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<HIGH>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3015.566745434249,\n        \"min\": 102970.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<LOW>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3010.0520230331895,\n        \"min\": 102680.0,\n        \"max\": 119210.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106210.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<CLOSE>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.6811852815595,\n        \"min\": 102680.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<VOL>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 682,\n        \"min\": 1,\n        \"max\": 24019,\n        \"num_unique_values\": 3256,\n        \"samples\": [\n          1028\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 2
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "MzWlX7oP4u40"
      },
      "source": [
        "Можно окинуть взглядом и весь набор данных:"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 424
        },
        "id": "6Cvpp9S04x9t",
        "outputId": "5478fa10-f6aa-45d0-8f63-7f442a58b103"
      },
      "source": [
        "data"
      ],
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "             <TICKER>  <PER>    <DATE> <TIME>    <OPEN>    <HIGH>     <LOW>  \\\n",
              "0      SPFB.RTS-12.18      1  03/09/18  10:01  107900.0  108060.0  107900.0   \n",
              "1      SPFB.RTS-12.18      1  03/09/18  10:02  107960.0  107960.0  107960.0   \n",
              "2      SPFB.RTS-12.18      1  03/09/18  10:04  108000.0  108000.0  108000.0   \n",
              "3      SPFB.RTS-12.18      1  03/09/18  10:05  108000.0  108000.0  108000.0   \n",
              "4      SPFB.RTS-12.18      1  03/09/18  10:08  108080.0  108080.0  108080.0   \n",
              "...               ...    ...       ...    ...       ...       ...       ...   \n",
              "58965  SPFB.RTS-12.18      1  20/12/18  18:40  109380.0  109380.0  109380.0   \n",
              "58966  SPFB.RTS-12.18      1  20/12/18  18:41  109380.0  109390.0  109380.0   \n",
              "58967  SPFB.RTS-12.18      1  20/12/18  18:43  109380.0  109390.0  109380.0   \n",
              "58968  SPFB.RTS-12.18      1  20/12/18  18:44  109390.0  109390.0  109390.0   \n",
              "58969  SPFB.RTS-12.18      1  20/12/18  18:45  109390.0  109390.0  109380.0   \n",
              "\n",
              "        <CLOSE>  <VOL>  \n",
              "0      108030.0      3  \n",
              "1      107960.0      5  \n",
              "2      108000.0      8  \n",
              "3      108000.0      1  \n",
              "4      108080.0      1  \n",
              "...         ...    ...  \n",
              "58965  109380.0      1  \n",
              "58966  109390.0     10  \n",
              "58967  109390.0     12  \n",
              "58968  109390.0      3  \n",
              "58969  109380.0      3  \n",
              "\n",
              "[58970 rows x 9 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-c98d957b-e615-4667-8bd3-7ed829d99150\" class=\"colab-df-container\">\n",
              "    <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>&lt;TICKER&gt;</th>\n",
              "      <th>&lt;PER&gt;</th>\n",
              "      <th>&lt;DATE&gt;</th>\n",
              "      <th>&lt;TIME&gt;</th>\n",
              "      <th>&lt;OPEN&gt;</th>\n",
              "      <th>&lt;HIGH&gt;</th>\n",
              "      <th>&lt;LOW&gt;</th>\n",
              "      <th>&lt;CLOSE&gt;</th>\n",
              "      <th>&lt;VOL&gt;</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:01</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108060.0</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108030.0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:02</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>5</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:04</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>8</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:05</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:08</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>1</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",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>58965</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>20/12/18</td>\n",
              "      <td>18:40</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>1</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>58966</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>20/12/18</td>\n",
              "      <td>18:41</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>10</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>58967</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>20/12/18</td>\n",
              "      <td>18:43</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>12</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>58968</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>20/12/18</td>\n",
              "      <td>18:44</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>58969</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>20/12/18</td>\n",
              "      <td>18:45</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109390.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>109380.0</td>\n",
              "      <td>3</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>58970 rows × 9 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-c98d957b-e615-4667-8bd3-7ed829d99150')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-c98d957b-e615-4667-8bd3-7ed829d99150 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-c98d957b-e615-4667-8bd3-7ed829d99150');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-d4fe0a23-31df-4a35-9ea6-3fa3fa364e1d\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-d4fe0a23-31df-4a35-9ea6-3fa3fa364e1d')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-d4fe0a23-31df-4a35-9ea6-3fa3fa364e1d button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "  <div id=\"id_155707e5-d105-4ea8-beb5-c53c2caeb3a9\">\n",
              "    <style>\n",
              "      .colab-df-generate {\n",
              "        background-color: #E8F0FE;\n",
              "        border: none;\n",
              "        border-radius: 50%;\n",
              "        cursor: pointer;\n",
              "        display: none;\n",
              "        fill: #1967D2;\n",
              "        height: 32px;\n",
              "        padding: 0 0 0 0;\n",
              "        width: 32px;\n",
              "      }\n",
              "\n",
              "      .colab-df-generate:hover {\n",
              "        background-color: #E2EBFA;\n",
              "        box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "        fill: #174EA6;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate {\n",
              "        background-color: #3B4455;\n",
              "        fill: #D2E3FC;\n",
              "      }\n",
              "\n",
              "      [theme=dark] .colab-df-generate:hover {\n",
              "        background-color: #434B5C;\n",
              "        box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "        fill: #FFFFFF;\n",
              "      }\n",
              "    </style>\n",
              "    <button class=\"colab-df-generate\" onclick=\"generateWithVariable('data')\"\n",
              "            title=\"Generate code using this dataframe.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "       width=\"24px\">\n",
              "    <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "    <script>\n",
              "      (() => {\n",
              "      const buttonEl =\n",
              "        document.querySelector('#id_155707e5-d105-4ea8-beb5-c53c2caeb3a9 button.colab-df-generate');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      buttonEl.onclick = () => {\n",
              "        google.colab.notebook.generateWithVariable('data');\n",
              "      }\n",
              "      })();\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "data",
              "summary": "{\n  \"name\": \"data\",\n  \"rows\": 58970,\n  \"fields\": [\n    {\n      \"column\": \"<TICKER>\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"SPFB.RTS-12.18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<PER>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 1,\n        \"max\": 1,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<DATE>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 78,\n        \"samples\": [\n          \"18/10/18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<TIME>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 811,\n        \"samples\": [\n          \"16:52\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<OPEN>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.668837539208,\n        \"min\": 102960.0,\n        \"max\": 119240.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106260.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<HIGH>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3015.566745434249,\n        \"min\": 102970.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<LOW>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3010.0520230331895,\n        \"min\": 102680.0,\n        \"max\": 119210.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106210.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<CLOSE>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.6811852815595,\n        \"min\": 102680.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<VOL>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 682,\n        \"min\": 1,\n        \"max\": 24019,\n        \"num_unique_values\": 3256,\n        \"samples\": [\n          1028\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 3
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "c8-vNj5940tT"
      },
      "source": [
        "Преобразуем дату в удобный для дальнейшего формат, склеив дату и время"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "id": "C_tNb96l4Kl1",
        "outputId": "c3dcffe6-b887-419b-be38-06ad504a182e"
      },
      "source": [
        "data['DATE'] = data['<DATE>'] + ' ' + data['<TIME>']\n",
        "data.head()"
      ],
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "         <TICKER>  <PER>    <DATE> <TIME>    <OPEN>    <HIGH>     <LOW>  \\\n",
              "0  SPFB.RTS-12.18      1  03/09/18  10:01  107900.0  108060.0  107900.0   \n",
              "1  SPFB.RTS-12.18      1  03/09/18  10:02  107960.0  107960.0  107960.0   \n",
              "2  SPFB.RTS-12.18      1  03/09/18  10:04  108000.0  108000.0  108000.0   \n",
              "3  SPFB.RTS-12.18      1  03/09/18  10:05  108000.0  108000.0  108000.0   \n",
              "4  SPFB.RTS-12.18      1  03/09/18  10:08  108080.0  108080.0  108080.0   \n",
              "\n",
              "    <CLOSE>  <VOL>            DATE  \n",
              "0  108030.0      3  03/09/18 10:01  \n",
              "1  107960.0      5  03/09/18 10:02  \n",
              "2  108000.0      8  03/09/18 10:04  \n",
              "3  108000.0      1  03/09/18 10:05  \n",
              "4  108080.0      1  03/09/18 10:08  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-644e2c26-1e05-43a5-b72c-3fcb551a6dae\" class=\"colab-df-container\">\n",
              "    <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>&lt;TICKER&gt;</th>\n",
              "      <th>&lt;PER&gt;</th>\n",
              "      <th>&lt;DATE&gt;</th>\n",
              "      <th>&lt;TIME&gt;</th>\n",
              "      <th>&lt;OPEN&gt;</th>\n",
              "      <th>&lt;HIGH&gt;</th>\n",
              "      <th>&lt;LOW&gt;</th>\n",
              "      <th>&lt;CLOSE&gt;</th>\n",
              "      <th>&lt;VOL&gt;</th>\n",
              "      <th>DATE</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:01</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108060.0</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108030.0</td>\n",
              "      <td>3</td>\n",
              "      <td>03/09/18 10:01</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:02</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>5</td>\n",
              "      <td>03/09/18 10:02</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:04</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>8</td>\n",
              "      <td>03/09/18 10:04</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:05</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18 10:05</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:08</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18 10:08</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-644e2c26-1e05-43a5-b72c-3fcb551a6dae')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-644e2c26-1e05-43a5-b72c-3fcb551a6dae button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-644e2c26-1e05-43a5-b72c-3fcb551a6dae');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-291861dc-3deb-4bd9-b0dc-02ffbf7ef197\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-291861dc-3deb-4bd9-b0dc-02ffbf7ef197')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-291861dc-3deb-4bd9-b0dc-02ffbf7ef197 button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "data",
              "summary": "{\n  \"name\": \"data\",\n  \"rows\": 58970,\n  \"fields\": [\n    {\n      \"column\": \"<TICKER>\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"SPFB.RTS-12.18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<PER>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 1,\n        \"max\": 1,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<DATE>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 78,\n        \"samples\": [\n          \"18/10/18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<TIME>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 811,\n        \"samples\": [\n          \"16:52\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<OPEN>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.668837539208,\n        \"min\": 102960.0,\n        \"max\": 119240.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106260.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<HIGH>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3015.566745434249,\n        \"min\": 102970.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<LOW>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3010.0520230331895,\n        \"min\": 102680.0,\n        \"max\": 119210.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106210.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<CLOSE>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.6811852815595,\n        \"min\": 102680.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<VOL>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 682,\n        \"min\": 1,\n        \"max\": 24019,\n        \"num_unique_values\": 3256,\n        \"samples\": [\n          1028\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"DATE\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 58970,\n        \"samples\": [\n          \"19/10/18 16:06\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 4
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "XU3o0ngN-zfI"
      },
      "source": [
        "Поработаем над форматом времени. Для этого переведем строковые данные, показывающие время, в специальный объект в Python."
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "fye-qaJP-c8M",
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 206
        },
        "outputId": "d060c787-5b18-4541-9b50-b85e601b6091"
      },
      "source": [
        "data['DATE'] = pd.to_datetime(data['DATE'], format=\"%d/%m/%y %H:%M\")\n",
        "data.head()"
      ],
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "         <TICKER>  <PER>    <DATE> <TIME>    <OPEN>    <HIGH>     <LOW>  \\\n",
              "0  SPFB.RTS-12.18      1  03/09/18  10:01  107900.0  108060.0  107900.0   \n",
              "1  SPFB.RTS-12.18      1  03/09/18  10:02  107960.0  107960.0  107960.0   \n",
              "2  SPFB.RTS-12.18      1  03/09/18  10:04  108000.0  108000.0  108000.0   \n",
              "3  SPFB.RTS-12.18      1  03/09/18  10:05  108000.0  108000.0  108000.0   \n",
              "4  SPFB.RTS-12.18      1  03/09/18  10:08  108080.0  108080.0  108080.0   \n",
              "\n",
              "    <CLOSE>  <VOL>                DATE  \n",
              "0  108030.0      3 2018-09-03 10:01:00  \n",
              "1  107960.0      5 2018-09-03 10:02:00  \n",
              "2  108000.0      8 2018-09-03 10:04:00  \n",
              "3  108000.0      1 2018-09-03 10:05:00  \n",
              "4  108080.0      1 2018-09-03 10:08:00  "
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-016a3dee-a10c-4905-9a49-d5090dfcd6f4\" class=\"colab-df-container\">\n",
              "    <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>&lt;TICKER&gt;</th>\n",
              "      <th>&lt;PER&gt;</th>\n",
              "      <th>&lt;DATE&gt;</th>\n",
              "      <th>&lt;TIME&gt;</th>\n",
              "      <th>&lt;OPEN&gt;</th>\n",
              "      <th>&lt;HIGH&gt;</th>\n",
              "      <th>&lt;LOW&gt;</th>\n",
              "      <th>&lt;CLOSE&gt;</th>\n",
              "      <th>&lt;VOL&gt;</th>\n",
              "      <th>DATE</th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>0</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:01</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108060.0</td>\n",
              "      <td>107900.0</td>\n",
              "      <td>108030.0</td>\n",
              "      <td>3</td>\n",
              "      <td>2018-09-03 10:01:00</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>1</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:02</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>107960.0</td>\n",
              "      <td>5</td>\n",
              "      <td>2018-09-03 10:02:00</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:04</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>8</td>\n",
              "      <td>2018-09-03 10:04:00</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>3</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:05</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>108000.0</td>\n",
              "      <td>1</td>\n",
              "      <td>2018-09-03 10:05:00</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>4</th>\n",
              "      <td>SPFB.RTS-12.18</td>\n",
              "      <td>1</td>\n",
              "      <td>03/09/18</td>\n",
              "      <td>10:08</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>108080.0</td>\n",
              "      <td>1</td>\n",
              "      <td>2018-09-03 10:08:00</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-016a3dee-a10c-4905-9a49-d5090dfcd6f4')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-016a3dee-a10c-4905-9a49-d5090dfcd6f4 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-016a3dee-a10c-4905-9a49-d5090dfcd6f4');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-4c9175cf-7871-49af-a5e9-984145a15f5c\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-4c9175cf-7871-49af-a5e9-984145a15f5c')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-4c9175cf-7871-49af-a5e9-984145a15f5c button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "data",
              "summary": "{\n  \"name\": \"data\",\n  \"rows\": 58970,\n  \"fields\": [\n    {\n      \"column\": \"<TICKER>\",\n      \"properties\": {\n        \"dtype\": \"category\",\n        \"num_unique_values\": 1,\n        \"samples\": [\n          \"SPFB.RTS-12.18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<PER>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 0,\n        \"min\": 1,\n        \"max\": 1,\n        \"num_unique_values\": 1,\n        \"samples\": [\n          1\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<DATE>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 78,\n        \"samples\": [\n          \"18/10/18\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<TIME>\",\n      \"properties\": {\n        \"dtype\": \"object\",\n        \"num_unique_values\": 811,\n        \"samples\": [\n          \"16:52\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<OPEN>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.668837539208,\n        \"min\": 102960.0,\n        \"max\": 119240.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106260.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<HIGH>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3015.566745434249,\n        \"min\": 102970.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<LOW>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3010.0520230331895,\n        \"min\": 102680.0,\n        \"max\": 119210.0,\n        \"num_unique_values\": 1620,\n        \"samples\": [\n          106210.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<CLOSE>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 3012.6811852815595,\n        \"min\": 102680.0,\n        \"max\": 119250.0,\n        \"num_unique_values\": 1622,\n        \"samples\": [\n          106250.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"<VOL>\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 682,\n        \"min\": 1,\n        \"max\": 24019,\n        \"num_unique_values\": 3256,\n        \"samples\": [\n          1028\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"DATE\",\n      \"properties\": {\n        \"dtype\": \"date\",\n        \"min\": \"2018-09-03 10:01:00\",\n        \"max\": \"2018-12-20 18:45:00\",\n        \"num_unique_values\": 58970,\n        \"samples\": [\n          \"2018-10-19 16:06:00\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 5
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "CSKb0R4HUD5R"
      },
      "source": [
        "Сформируем интересующую нас выборку"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "lq-MazIyUF0L"
      },
      "source": [
        "df_filtered = data[data['DATE'].dt.strftime('%Y-%m-%d') == '2018-09-06']"
      ],
      "execution_count": 6,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "rdUBP4iXUNP_"
      },
      "source": [
        "Теперь полная дата будет для нас индеком объектов"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "dWE0U3erUMie"
      },
      "source": [
        "df_filtered = df_filtered.set_index('DATE')"
      ],
      "execution_count": 7,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "bgepmPoUUUq3"
      },
      "source": [
        "Выберем только интересующие для построения столбцы:"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "Jsa6lqjqUXlv"
      },
      "source": [
        "df_filtered = df_filtered[['<OPEN>','<HIGH>','<LOW>','<CLOSE>']]"
      ],
      "execution_count": 8,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "Hpx5wqwHUx4I"
      },
      "source": [
        "Переименуем (для удобства) столбцы:"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 238
        },
        "id": "TMIE9Q_dUa3k",
        "outputId": "2f7b7775-b233-4ae1-bd31-60cea9fd9756"
      },
      "source": [
        "df_filtered.columns =['open', 'high', 'low', 'close']\n",
        "df_filtered.head()"
      ],
      "execution_count": 9,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "                         open      high       low     close\n",
              "DATE                                                       \n",
              "2018-09-06 10:01:00  106200.0  106200.0  105820.0  105920.0\n",
              "2018-09-06 10:03:00  106030.0  106030.0  106030.0  106030.0\n",
              "2018-09-06 10:04:00  106060.0  106080.0  106060.0  106080.0\n",
              "2018-09-06 10:09:00  106100.0  106170.0  106100.0  106170.0\n",
              "2018-09-06 10:12:00  106100.0  106100.0  106100.0  106100.0"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-a3575641-0c10-4011-9ad6-a3646b1bbcc1\" class=\"colab-df-container\">\n",
              "    <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>open</th>\n",
              "      <th>high</th>\n",
              "      <th>low</th>\n",
              "      <th>close</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>DATE</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>2018-09-06 10:01:00</th>\n",
              "      <td>106200.0</td>\n",
              "      <td>106200.0</td>\n",
              "      <td>105820.0</td>\n",
              "      <td>105920.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2018-09-06 10:03:00</th>\n",
              "      <td>106030.0</td>\n",
              "      <td>106030.0</td>\n",
              "      <td>106030.0</td>\n",
              "      <td>106030.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2018-09-06 10:04:00</th>\n",
              "      <td>106060.0</td>\n",
              "      <td>106080.0</td>\n",
              "      <td>106060.0</td>\n",
              "      <td>106080.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2018-09-06 10:09:00</th>\n",
              "      <td>106100.0</td>\n",
              "      <td>106170.0</td>\n",
              "      <td>106100.0</td>\n",
              "      <td>106170.0</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2018-09-06 10:12:00</th>\n",
              "      <td>106100.0</td>\n",
              "      <td>106100.0</td>\n",
              "      <td>106100.0</td>\n",
              "      <td>106100.0</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-a3575641-0c10-4011-9ad6-a3646b1bbcc1')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-a3575641-0c10-4011-9ad6-a3646b1bbcc1 button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-a3575641-0c10-4011-9ad6-a3646b1bbcc1');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-348a1572-49fc-41d2-8073-f32575bbc98e\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-348a1572-49fc-41d2-8073-f32575bbc98e')\"\n",
              "            title=\"Suggest charts\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-348a1572-49fc-41d2-8073-f32575bbc98e button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "\n",
              "    </div>\n",
              "  </div>\n"
            ],
            "application/vnd.google.colaboratory.intrinsic+json": {
              "type": "dataframe",
              "variable_name": "df_filtered",
              "summary": "{\n  \"name\": \"df_filtered\",\n  \"rows\": 454,\n  \"fields\": [\n    {\n      \"column\": \"DATE\",\n      \"properties\": {\n        \"dtype\": \"date\",\n        \"min\": \"2018-09-06 10:01:00\",\n        \"max\": \"2018-09-06 23:50:00\",\n        \"num_unique_values\": 454,\n        \"samples\": [\n          \"2018-09-06 17:55:00\",\n          \"2018-09-06 11:34:00\",\n          \"2018-09-06 18:36:00\"\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"open\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 943.5996789811621,\n        \"min\": 104110.0,\n        \"max\": 106830.0,\n        \"num_unique_values\": 172,\n        \"samples\": [\n          105420.0,\n          104380.0,\n          104200.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"high\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 944.4920125497532,\n        \"min\": 104110.0,\n        \"max\": 106850.0,\n        \"num_unique_values\": 174,\n        \"samples\": [\n          104430.0,\n          104280.0,\n          105080.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"low\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 944.2419461325612,\n        \"min\": 104110.0,\n        \"max\": 106810.0,\n        \"num_unique_values\": 166,\n        \"samples\": [\n          105080.0,\n          104440.0,\n          105400.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    },\n    {\n      \"column\": \"close\",\n      \"properties\": {\n        \"dtype\": \"number\",\n        \"std\": 944.0297280139222,\n        \"min\": 104110.0,\n        \"max\": 106810.0,\n        \"num_unique_values\": 170,\n        \"samples\": [\n          104350.0,\n          106660.0,\n          104600.0\n        ],\n        \"semantic_type\": \"\",\n        \"description\": \"\"\n      }\n    }\n  ]\n}"
            }
          },
          "metadata": {},
          "execution_count": 9
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "rmI0M-LsVB5H"
      },
      "source": [
        "Проведем агрегацию данных для построения графика свечей:"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "id": "eGCVuu8DUba5",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "956c24ef-64b7-4b3c-df0a-9b25017a745a"
      },
      "source": [
        "d2 = df_filtered.resample('1H').agg({'open':'first',\n",
        "                                     'high':'max',\n",
        "                                     'low':'min',\n",
        "                                     'close':'last'})"
      ],
      "execution_count": 10,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "<ipython-input-10-2a29dc5014b6>:1: FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.\n",
            "  d2 = df_filtered.resample('1H').agg({'open':'first',\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "4XRfnOj1U6er"
      },
      "source": [
        "Осталось подключить необходимую библиотеку и построить:"
      ]
    },
    {
      "cell_type": "code",
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 542
        },
        "id": "UZ6Nkg-DUq2B",
        "outputId": "ce146871-4e23-4a6d-d838-53e14adc4aba"
      },
      "source": [
        "import plotly.graph_objects as go\n",
        "\n",
        "fig = go.Figure(data=[go.Candlestick(x=d2.index,\n",
        "                open=d2['open'],\n",
        "                high=d2['high'],\n",
        "                low=d2['low'],\n",
        "                close=d2['close'])])\n",
        "\n",
        "fig.show()"
      ],
      "execution_count": 11,
      "outputs": [
        {
          "output_type": "display_data",
          "data": {
            "text/html": [
              "<html>\n",
              "<head><meta charset=\"utf-8\" /></head>\n",
              "<body>\n",
              "    <div>            <script src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG\"></script><script type=\"text/javascript\">if (window.MathJax && window.MathJax.Hub && window.MathJax.Hub.Config) {window.MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}</script>                <script type=\"text/javascript\">window.PlotlyConfig = {MathJaxConfig: 'local'};</script>\n",
              "        <script charset=\"utf-8\" src=\"https://cdn.plot.ly/plotly-2.35.2.min.js\"></script>                <div id=\"273f3d50-e671-4d3a-9cb3-dee892f94b34\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"273f3d50-e671-4d3a-9cb3-dee892f94b34\")) {                    Plotly.newPlot(                        \"273f3d50-e671-4d3a-9cb3-dee892f94b34\",                        [{\"close\":[106400.0,106520.0,106540.0,106580.0,106680.0,106250.0,105270.0,104970.0,104320.0,104300.0,104490.0,104510.0,104590.0,104640.0],\"high\":[106440.0,106670.0,106850.0,106670.0,106700.0,106720.0,106300.0,105450.0,104940.0,104610.0,104530.0,104700.0,104720.0,104780.0],\"low\":[105820.0,106380.0,106510.0,106440.0,106520.0,106120.0,105090.0,104870.0,104120.0,104110.0,104290.0,104420.0,104500.0,104580.0],\"open\":[106200.0,106380.0,106530.0,106540.0,106580.0,106700.0,106300.0,105290.0,104940.0,104600.0,104300.0,104590.0,104540.0,104700.0],\"x\":[\"2018-09-06T10:00:00\",\"2018-09-06T11:00:00\",\"2018-09-06T12:00:00\",\"2018-09-06T13:00:00\",\"2018-09-06T14:00:00\",\"2018-09-06T15:00:00\",\"2018-09-06T16:00:00\",\"2018-09-06T17:00:00\",\"2018-09-06T18:00:00\",\"2018-09-06T19:00:00\",\"2018-09-06T20:00:00\",\"2018-09-06T21:00:00\",\"2018-09-06T22:00:00\",\"2018-09-06T23:00:00\"],\"type\":\"candlestick\"}],                        {\"template\":{\"data\":{\"histogram2dcontour\":[{\"type\":\"histogram2dcontour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"choropleth\":[{\"type\":\"choropleth\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"histogram2d\":[{\"type\":\"histogram2d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmap\":[{\"type\":\"heatmap\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"heatmapgl\":[{\"type\":\"heatmapgl\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"contourcarpet\":[{\"type\":\"contourcarpet\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"contour\":[{\"type\":\"contour\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"surface\":[{\"type\":\"surface\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"},\"colorscale\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]]}],\"mesh3d\":[{\"type\":\"mesh3d\",\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}],\"scatter\":[{\"fillpattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2},\"type\":\"scatter\"}],\"parcoords\":[{\"type\":\"parcoords\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolargl\":[{\"type\":\"scatterpolargl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"bar\":[{\"error_x\":{\"color\":\"#2a3f5f\"},\"error_y\":{\"color\":\"#2a3f5f\"},\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"bar\"}],\"scattergeo\":[{\"type\":\"scattergeo\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterpolar\":[{\"type\":\"scatterpolar\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"histogram\":[{\"marker\":{\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"histogram\"}],\"scattergl\":[{\"type\":\"scattergl\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatter3d\":[{\"type\":\"scatter3d\",\"line\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattermapbox\":[{\"type\":\"scattermapbox\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scatterternary\":[{\"type\":\"scatterternary\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"scattercarpet\":[{\"type\":\"scattercarpet\",\"marker\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}}}],\"carpet\":[{\"aaxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"baxis\":{\"endlinecolor\":\"#2a3f5f\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"minorgridcolor\":\"white\",\"startlinecolor\":\"#2a3f5f\"},\"type\":\"carpet\"}],\"table\":[{\"cells\":{\"fill\":{\"color\":\"#EBF0F8\"},\"line\":{\"color\":\"white\"}},\"header\":{\"fill\":{\"color\":\"#C8D4E3\"},\"line\":{\"color\":\"white\"}},\"type\":\"table\"}],\"barpolar\":[{\"marker\":{\"line\":{\"color\":\"#E5ECF6\",\"width\":0.5},\"pattern\":{\"fillmode\":\"overlay\",\"size\":10,\"solidity\":0.2}},\"type\":\"barpolar\"}],\"pie\":[{\"automargin\":true,\"type\":\"pie\"}]},\"layout\":{\"autotypenumbers\":\"strict\",\"colorway\":[\"#636efa\",\"#EF553B\",\"#00cc96\",\"#ab63fa\",\"#FFA15A\",\"#19d3f3\",\"#FF6692\",\"#B6E880\",\"#FF97FF\",\"#FECB52\"],\"font\":{\"color\":\"#2a3f5f\"},\"hovermode\":\"closest\",\"hoverlabel\":{\"align\":\"left\"},\"paper_bgcolor\":\"white\",\"plot_bgcolor\":\"#E5ECF6\",\"polar\":{\"bgcolor\":\"#E5ECF6\",\"angularaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"radialaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"ternary\":{\"bgcolor\":\"#E5ECF6\",\"aaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"baxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"},\"caxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\"}},\"coloraxis\":{\"colorbar\":{\"outlinewidth\":0,\"ticks\":\"\"}},\"colorscale\":{\"sequential\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"sequentialminus\":[[0.0,\"#0d0887\"],[0.1111111111111111,\"#46039f\"],[0.2222222222222222,\"#7201a8\"],[0.3333333333333333,\"#9c179e\"],[0.4444444444444444,\"#bd3786\"],[0.5555555555555556,\"#d8576b\"],[0.6666666666666666,\"#ed7953\"],[0.7777777777777778,\"#fb9f3a\"],[0.8888888888888888,\"#fdca26\"],[1.0,\"#f0f921\"]],\"diverging\":[[0,\"#8e0152\"],[0.1,\"#c51b7d\"],[0.2,\"#de77ae\"],[0.3,\"#f1b6da\"],[0.4,\"#fde0ef\"],[0.5,\"#f7f7f7\"],[0.6,\"#e6f5d0\"],[0.7,\"#b8e186\"],[0.8,\"#7fbc41\"],[0.9,\"#4d9221\"],[1,\"#276419\"]]},\"xaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"yaxis\":{\"gridcolor\":\"white\",\"linecolor\":\"white\",\"ticks\":\"\",\"title\":{\"standoff\":15},\"zerolinecolor\":\"white\",\"automargin\":true,\"zerolinewidth\":2},\"scene\":{\"xaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"yaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2},\"zaxis\":{\"backgroundcolor\":\"#E5ECF6\",\"gridcolor\":\"white\",\"linecolor\":\"white\",\"showbackground\":true,\"ticks\":\"\",\"zerolinecolor\":\"white\",\"gridwidth\":2}},\"shapedefaults\":{\"line\":{\"color\":\"#2a3f5f\"}},\"annotationdefaults\":{\"arrowcolor\":\"#2a3f5f\",\"arrowhead\":0,\"arrowwidth\":1},\"geo\":{\"bgcolor\":\"white\",\"landcolor\":\"#E5ECF6\",\"subunitcolor\":\"white\",\"showland\":true,\"showlakes\":true,\"lakecolor\":\"white\"},\"title\":{\"x\":0.05},\"mapbox\":{\"style\":\"light\"}}}},                        {\"responsive\": true}                    ).then(function(){\n",
              "                            \n",
              "var gd = document.getElementById('273f3d50-e671-4d3a-9cb3-dee892f94b34');\n",
              "var x = new MutationObserver(function (mutations, observer) {{\n",
              "        var display = window.getComputedStyle(gd).display;\n",
              "        if (!display || display === 'none') {{\n",
              "            console.log([gd, 'removed!']);\n",
              "            Plotly.purge(gd);\n",
              "            observer.disconnect();\n",
              "        }}\n",
              "}});\n",
              "\n",
              "// Listen for the removal of the full notebook cells\n",
              "var notebookContainer = gd.closest('#notebook-container');\n",
              "if (notebookContainer) {{\n",
              "    x.observe(notebookContainer, {childList: true});\n",
              "}}\n",
              "\n",
              "// Listen for the clearing of the current output cell\n",
              "var outputEl = gd.closest('.output');\n",
              "if (outputEl) {{\n",
              "    x.observe(outputEl, {childList: true});\n",
              "}}\n",
              "\n",
              "                        })                };                            </script>        </div>\n",
              "</body>\n",
              "</html>"
            ]
          },
          "metadata": {}
        }
      ]
    }
  ]
}
```