Created
December 30, 2020 12:08
-
-
Save nishimotz/4ba020fa0117a19093b36a0c24202c72 to your computer and use it in GitHub Desktop.
「アンナほえたワン」を再集計した
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# すごい広島 with Python\n", | |
"\n", | |
"## 2020-12-30 @nishimotz / @24motz\n", | |
"\n", | |
"### 「アンナほえたワン」を再集計した\n", | |
"\n", | |
"過去の報告\n", | |
"\n", | |
"* https://gist.github.com/nishimotz/8a989398c1fca4ddcfdb10745676e4e2 → 2020年6月。今回は不要な処理を削って、データを追加\n", | |
"* https://www.slideshare.net/nishimotz/200429-python\n", | |
"* https://www.slideshare.net/nishimotz/191030-annawithpython" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 入力データ\n", | |
"* 記録時刻(約5分周期。時刻はUTC), 直前の5分間にほえた回数\n", | |
"\n", | |
"dogbarks_xxx.csv\n", | |
"\n", | |
"```\n", | |
"2019-10-27 12:26:44+00:00,18\n", | |
"2019-10-27 22:45:05+00:00,3\n", | |
"2019-10-27 23:34:57+00:00,17\n", | |
"```\n", | |
"\n", | |
"* 200を超える値はシステムの誤動作(後述)\n", | |
"* 稼働しなかった日は欠損データ(後述)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"import numpy as np" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"* 第1列を datetime として読み込んで index にする\n", | |
"* 各列を datetime, barks と名付ける" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"filename = \"dogbarks_201230.csv\"" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df = pd.read_csv(filename, parse_dates=[0], index_col=0, names=['datetime','barks'])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>barks</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>datetime</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2020-12-29 05:28:09+00:00</th>\n", | |
" <td>33</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-29 06:23:00+00:00</th>\n", | |
" <td>31</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 01:14:51+00:00</th>\n", | |
" <td>4</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 03:34:28+00:00</th>\n", | |
" <td>22</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 06:04:03+00:00</th>\n", | |
" <td>3</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" barks\n", | |
"datetime \n", | |
"2020-12-29 05:28:09+00:00 33\n", | |
"2020-12-29 06:23:00+00:00 31\n", | |
"2020-12-30 01:14:51+00:00 4\n", | |
"2020-12-30 03:34:28+00:00 22\n", | |
"2020-12-30 06:04:03+00:00 3" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.tail()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"* インデックス列を UTC から JST に変換する\n", | |
"* インデックス列の名前を localtime にする" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df.index = df.index.tz_convert('Asia/Tokyo')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>barks</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>datetime</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2020-12-29 14:28:09+09:00</th>\n", | |
" <td>33</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-29 15:23:00+09:00</th>\n", | |
" <td>31</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 10:14:51+09:00</th>\n", | |
" <td>4</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 12:34:28+09:00</th>\n", | |
" <td>22</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 15:04:03+09:00</th>\n", | |
" <td>3</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" barks\n", | |
"datetime \n", | |
"2020-12-29 14:28:09+09:00 33\n", | |
"2020-12-29 15:23:00+09:00 31\n", | |
"2020-12-30 10:14:51+09:00 4\n", | |
"2020-12-30 12:34:28+09:00 22\n", | |
"2020-12-30 15:04:03+09:00 3" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.tail()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df.index = df.index.set_names('localtime')" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 200を超える値を除外する\n", | |
"\n", | |
"* 2019年10月ごろシステムが誤動作していた\n", | |
"* 不正な値を削除したい\n", | |
"* 5分間に 200 を超える場合は誤動作とみなす\n", | |
"* 200以下の場合だけを残して df を更新する" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df = df[ df['barks'] <= 200 ]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>barks</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>localtime</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2020-12-29 14:28:09+09:00</th>\n", | |
" <td>33</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-29 15:23:00+09:00</th>\n", | |
" <td>31</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 10:14:51+09:00</th>\n", | |
" <td>4</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 12:34:28+09:00</th>\n", | |
" <td>22</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2020-12-30 15:04:03+09:00</th>\n", | |
" <td>3</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" barks\n", | |
"localtime \n", | |
"2020-12-29 14:28:09+09:00 33\n", | |
"2020-12-29 15:23:00+09:00 31\n", | |
"2020-12-30 10:14:51+09:00 4\n", | |
"2020-12-30 12:34:28+09:00 22\n", | |
"2020-12-30 15:04:03+09:00 3" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.tail()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>barks</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>count</th>\n", | |
" <td>3510.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>mean</th>\n", | |
" <td>19.029915</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>std</th>\n", | |
" <td>20.371373</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>min</th>\n", | |
" <td>2.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25%</th>\n", | |
" <td>5.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50%</th>\n", | |
" <td>11.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>75%</th>\n", | |
" <td>25.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>max</th>\n", | |
" <td>193.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" barks\n", | |
"count 3510.000000\n", | |
"mean 19.029915\n", | |
"std 20.371373\n", | |
"min 2.000000\n", | |
"25% 5.000000\n", | |
"50% 11.000000\n", | |
"75% 25.000000\n", | |
"max 193.000000" | |
] | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.describe()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 合計が0の日を除外する\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"* 最初と最後の月は日数が少ない。稼働しなかった日(欠損データ)もある。\n", | |
"* リサンプリングで1日の sum を作り、合計が0の日を除外する。\n", | |
"* 本当に 0 だった(記録がなかった)日も除外している(が、ほとんどない)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ser_d = df['barks'].resample('D').sum()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ser_d = ser_d[ ser_d > 0 ]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"localtime\n", | |
"2019-10-27 00:00:00+09:00 18\n", | |
"2019-10-28 00:00:00+09:00 372\n", | |
"2019-10-29 00:00:00+09:00 176\n", | |
"2019-10-30 00:00:00+09:00 337\n", | |
"2019-10-31 00:00:00+09:00 569\n", | |
"Name: barks, dtype: int64" | |
] | |
}, | |
"execution_count": 13, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ser_d.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"localtime\n", | |
"2020-12-03 00:00:00+09:00 127\n", | |
"2020-12-06 00:00:00+09:00 57\n", | |
"2020-12-07 00:00:00+09:00 24\n", | |
"2020-12-08 00:00:00+09:00 3\n", | |
"2020-12-09 00:00:00+09:00 44\n", | |
"2020-12-11 00:00:00+09:00 33\n", | |
"2020-12-12 00:00:00+09:00 8\n", | |
"2020-12-13 00:00:00+09:00 69\n", | |
"2020-12-18 00:00:00+09:00 7\n", | |
"2020-12-19 00:00:00+09:00 13\n", | |
"2020-12-20 00:00:00+09:00 97\n", | |
"2020-12-21 00:00:00+09:00 16\n", | |
"2020-12-23 00:00:00+09:00 13\n", | |
"2020-12-24 00:00:00+09:00 129\n", | |
"2020-12-25 00:00:00+09:00 4\n", | |
"2020-12-26 00:00:00+09:00 74\n", | |
"2020-12-27 00:00:00+09:00 30\n", | |
"2020-12-28 00:00:00+09:00 63\n", | |
"2020-12-29 00:00:00+09:00 158\n", | |
"2020-12-30 00:00:00+09:00 29\n", | |
"Name: barks, dtype: int64" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ser_d.tail(20)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 1日にほえた回数" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"from matplotlib import pyplot as plt" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAABBsAAAI/CAYAAAA2r9HeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3df6xk510f4M+3XjAQiLDxOjJewzWVBbUj2pCtG0oFiLSyW6PYLURdVMjSBrlQlx9Vq3JdqgZVsmpoRQuCILkhxWmjuG4A2XQJxV1AlCrEbBKTxDaOF+zai914gQJJqrq1efvHPYvH63t37868M3Nm5nmk0cy8c2bOe2beOT8+5z3nVGstAAAAAL38qWVXAAAAAFgvwgYAAACgK2EDAAAA0JWwAQAAAOhK2AAAAAB0JWwAAAAAujqw7Aqcz2WXXda2traWXQ0AAABgwgc/+MHfba0d3O210YcNW1tbOXHixLKrAQAAAEyoqv+x12sOowAAAAC6EjYAAAAAXQkbAAAAgK6EDQAAAEBXwgYAAACgq/OGDVX1zqp6rqo+NlH2L6vqN6vqI1X1M1X1+ROv3V5VJ6vqsaq6YaL89VX10eG1H6mq6j85AAAAwLLtp2fDTya58ayyB5K8trX25Uk+nuT2JKmqa5McSXLd8J63V9VFw3t+PMmtSa4Zbmd/JgAAALAGzhs2tNZ+Jcnvn1X2C621F4anv5bk0PD45iT3tNaeb609keRkkuur6ookr26tvb+11pK8K8ktvSYCAAAAGI8e52z4O0neNzy+MsnTE6+dGsquHB6fXQ4AAACsmZnChqr6viQvJHn3maJdBmvnKN/rc2+tqhNVdeL06dOzVBEAAABYsKn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AAHT1/wFmPUS/nVXhkQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 1296x720 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"fig = plt.figure(figsize=(18,10))\n", | |
"ax = fig.add_subplot(111)\n", | |
"ax.bar(ser_d.index, ser_d, label='barks')\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"* 1週間、1か月ごとにリサンプリング" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAABBQAAAI/CAYAAADHpIpTAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dcezc913f8debuISpFJG0ThaSlF+YrHYJgha8rBUTsGZbwzyRbpDNSAMzBWVsWQFp0+ps08YmWTP9oxsTFCkrbGYDgleoEjCDZYZqY+oaXBpKkzSN23qJSZaYjg5aaUFJP/vj9zU93J/re9u/+93593s8pNPdfX+fu/vc73NyLs/f975XY4wAAAAAdHzRsicAAAAAXH4EBQAAAKBNUAAAAADaBAUAAACgTVAAAAAA2gQFAAAAoG3XsieQJK961avG2trasqcBAAAAnOMDH/jA744xdp+7fSWCwtraWk6cOLHsaQAAAADnqKr/tdF2H3kAAAAA2gQFAAAAoE1QAAAAANoEBQAAAKBNUAAAAADaBAUAAACgTVAAAAAA2gQFAAAAoE1QAAAAANoEBQAAAKBNUAAAAADaBAUAAACgTVAAAAAA2gQFAAAAoE1QAAAAANoEBQAAAKBtrqBQVV9eVe+uqo9U1eNV9caqurqqHqqqJ6fzq2bG31tVJ6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jiW5d4zxP84OnnaX+oOqesN0n9+V5IFz1/584xb9PPmcVVrzqtoz8/j7kjy5iOfMuhVb++tmHv9bs/65ThZkldZ+uv/XJLkqyfsW9Zz541bpNVBVr6qqs+/T703yE4t63mz92m/BU2JOm7X257Mj3uePFTgy5OVwyvo3NowkH0ryyHT6y1n/1objWX+TfzzJ1TO3OZXk/yT5dNZr1M3T9p9J8th02v8FHvPt0+0+O53/4LT9z0zXP5Pkk0keXfbvZzufumuf9V3SPzMz9pEk10w/25vkw0k+luRHktR5HnPDcdZ+R675D2f9oD+PZP3AXLcs+/eznU8rtvb/clr735rW/rXL/v1s59Mqrf30sx9McnjZv5eddFql10CSb58e76NJ3pXkymX/frbzaUlr733+Cpw2ee03XNMNHnNbvc8/O3kAAACAufnIAwAAANAmKAAAAABtggIAAADQJigAAAAAbYICAAAA0CYoAAAAAG2CAgAAANAmKAAAAABt/0GvBtEAAAAFSURBVB8w4HENv2BFkQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 1296x720 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"ser_d_w = ser_d.resample('W').agg('mean')\n", | |
"fig = plt.figure(figsize=(18,10))\n", | |
"ax = fig.add_subplot(111)\n", | |
"ax.bar(ser_d_w.index, ser_d_w, label='barks', width=5)\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"ser_d_m = ser_d.resample('M').agg('mean')\n", | |
"ser_d_m.index = ser_d_m.index.map(lambda t: t.replace(day=1))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAABCcAAAI/CAYAAABEYLNoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB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7R8bY/zMGOOFSf7ltOz/zulhMuM8zznNznW+py+3+kiSnx1jfGlavOJr91xe4yzeJp3ru7J8ZhVztlnme4zxtZn/x+Y9SX50no+T79gscz5jX5IPzufRcTabZe69Xz8/zvN8swnMac7PtO+Fvl+f5691VJL3JnlojPGOmT/dk2T/dHt/lj/3stq+Lp+uL0nyT5P85hjj1Bjj+unyr6fTUb5ZVS+ajv2zz+y7qi6rqmce221J3jeHh8hpzvecz3f0nKtzne+q+r4kh5LcNsb4X8+sfKbX7rm8xlmszTTXVbV75vh7kzyyiMe8nW2y+d41c/yfTvLQIh7zdreZ5nza/w8kuSTJHy3qMbNsM8299+uLd77n+zw8JFYxrzk/k4W/Xx/z+7KNn8jyKRyfTfLAdHlFln+J4XCW31AeTnLpzDbHk3w9ybeyXF2unZZ/MMmD02XfWY65J8nnk3wpybuS1LT8NdPxvpjkN3Pal3q4XNBz/vZpu29P12+blv/YdP8vs/xFLke7n5+tdjnX+c7y6fd/ObPuA0kun/624mt3hWOe6TVuvrfPXP+HLH9p2gNJPpHkuu7nZ6tdNtl8/7tpvj8zzfcPdj8/W/GymeZ8+tvbkhzsfl62w2UzzX28X9+q8+29+taZ8xXncoVjzu39+jMbAgAAALRYyK91AAAAAKyVOAEAAAC0EicAAACAVuIEAAAA0EqcAAAAAFqJEwAAAEArcQIAAABoJU4AAAAArf4/DB+AVk/LID4AAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 1296x720 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"fig = plt.figure(figsize=(18,10))\n", | |
"ax = fig.add_subplot(111)\n", | |
"ax.bar(ser_d_m.index, ser_d_m, label='barks', width=20)\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## 時間帯別に集計\n", | |
"* 最初の df を作るところからやり直す\n", | |
"* date と同じように hour という列を作る方法" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df = pd.read_csv(filename, parse_dates=[0], index_col=0, names=['datetime','barks'])\n", | |
"df = df[ df['barks'] <= 200 ]\n", | |
"df.index = df.index.tz_convert('Asia/Tokyo')\n", | |
"df.index = df.index.set_names('localtime')\n", | |
"df['date'] = df.index.date\n", | |
"df['hour'] = df.index.hour" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>barks</th>\n", | |
" <th>date</th>\n", | |
" <th>hour</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>localtime</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>2019-10-27 21:26:44+09:00</th>\n", | |
" <td>18</td>\n", | |
" <td>2019-10-27</td>\n", | |
" <td>21</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2019-10-28 07:45:05+09:00</th>\n", | |
" <td>3</td>\n", | |
" <td>2019-10-28</td>\n", | |
" <td>7</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2019-10-28 08:34:57+09:00</th>\n", | |
" <td>17</td>\n", | |
" <td>2019-10-28</td>\n", | |
" <td>8</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2019-10-28 09:19:50+09:00</th>\n", | |
" <td>19</td>\n", | |
" <td>2019-10-28</td>\n", | |
" <td>9</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2019-10-28 09:34:47+09:00</th>\n", | |
" <td>39</td>\n", | |
" <td>2019-10-28</td>\n", | |
" <td>9</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" barks date hour\n", | |
"localtime \n", | |
"2019-10-27 21:26:44+09:00 18 2019-10-27 21\n", | |
"2019-10-28 07:45:05+09:00 3 2019-10-28 7\n", | |
"2019-10-28 08:34:57+09:00 17 2019-10-28 8\n", | |
"2019-10-28 09:19:50+09:00 19 2019-10-28 9\n", | |
"2019-10-28 09:34:47+09:00 39 2019-10-28 9" | |
] | |
}, | |
"execution_count": 21, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead tr th {\n", | |
" text-align: left;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead tr:last-of-type th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th></th>\n", | |
" <th colspan=\"8\" halign=\"left\">barks</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th></th>\n", | |
" <th>count</th>\n", | |
" <th>mean</th>\n", | |
" <th>std</th>\n", | |
" <th>min</th>\n", | |
" <th>25%</th>\n", | |
" <th>50%</th>\n", | |
" <th>75%</th>\n", | |
" <th>max</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>hour</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>1.0</td>\n", | |
" <td>3.000000</td>\n", | |
" <td>NaN</td>\n", | |
" <td>3.0</td>\n", | |
" <td>3.00</td>\n", | |
" <td>3.0</td>\n", | |
" <td>3.00</td>\n", | |
" <td>3.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>3.0</td>\n", | |
" <td>4.666667</td>\n", | |
" <td>2.081666</td>\n", | |
" <td>3.0</td>\n", | |
" <td>3.50</td>\n", | |
" <td>4.0</td>\n", | |
" <td>5.50</td>\n", | |
" <td>7.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>3.0</td>\n", | |
" <td>64.000000</td>\n", | |
" <td>99.654403</td>\n", | |
" <td>3.0</td>\n", | |
" <td>6.50</td>\n", | |
" <td>10.0</td>\n", | |
" <td>94.50</td>\n", | |
" <td>179.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>2.0</td>\n", | |
" <td>3.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>3.0</td>\n", | |
" <td>3.00</td>\n", | |
" <td>3.0</td>\n", | |
" <td>3.00</td>\n", | |
" <td>3.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>14.0</td>\n", | |
" <td>23.428571</td>\n", | |
" <td>50.255829</td>\n", | |
" <td>3.0</td>\n", | |
" <td>4.25</td>\n", | |
" <td>7.0</td>\n", | |
" <td>12.75</td>\n", | |
" <td>193.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>5.0</td>\n", | |
" <td>10.200000</td>\n", | |
" <td>6.797058</td>\n", | |
" <td>3.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>8.0</td>\n", | |
" <td>14.00</td>\n", | |
" <td>20.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>20.0</td>\n", | |
" <td>7.450000</td>\n", | |
" <td>8.438477</td>\n", | |
" <td>2.0</td>\n", | |
" <td>3.00</td>\n", | |
" <td>4.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>34.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>94.0</td>\n", | |
" <td>17.106383</td>\n", | |
" <td>17.334451</td>\n", | |
" <td>2.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>10.5</td>\n", | |
" <td>20.00</td>\n", | |
" <td>70.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>263.0</td>\n", | |
" <td>21.007605</td>\n", | |
" <td>22.688059</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>13.0</td>\n", | |
" <td>26.00</td>\n", | |
" <td>139.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>351.0</td>\n", | |
" <td>20.253561</td>\n", | |
" <td>21.585209</td>\n", | |
" <td>2.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>13.0</td>\n", | |
" <td>28.00</td>\n", | |
" <td>132.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>340.0</td>\n", | |
" <td>20.411765</td>\n", | |
" <td>20.447526</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>12.0</td>\n", | |
" <td>29.00</td>\n", | |
" <td>134.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>273.0</td>\n", | |
" <td>18.956044</td>\n", | |
" <td>17.807743</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>12.0</td>\n", | |
" <td>25.00</td>\n", | |
" <td>106.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>178.0</td>\n", | |
" <td>20.050562</td>\n", | |
" <td>20.292848</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>12.0</td>\n", | |
" <td>27.75</td>\n", | |
" <td>120.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>257.0</td>\n", | |
" <td>19.217899</td>\n", | |
" <td>23.706852</td>\n", | |
" <td>2.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>11.0</td>\n", | |
" <td>26.00</td>\n", | |
" <td>184.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>270.0</td>\n", | |
" <td>24.203704</td>\n", | |
" <td>24.317586</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>17.0</td>\n", | |
" <td>33.00</td>\n", | |
" <td>137.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>265.0</td>\n", | |
" <td>17.215094</td>\n", | |
" <td>16.314004</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>12.0</td>\n", | |
" <td>23.00</td>\n", | |
" <td>99.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>16</th>\n", | |
" <td>314.0</td>\n", | |
" <td>21.235669</td>\n", | |
" <td>21.794169</td>\n", | |
" <td>3.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>12.0</td>\n", | |
" <td>28.00</td>\n", | |
" <td>124.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>17</th>\n", | |
" <td>368.0</td>\n", | |
" <td>18.214674</td>\n", | |
" <td>17.294692</td>\n", | |
" <td>2.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>13.0</td>\n", | |
" <td>25.00</td>\n", | |
" <td>144.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>18</th>\n", | |
" <td>231.0</td>\n", | |
" <td>14.766234</td>\n", | |
" <td>14.647062</td>\n", | |
" <td>2.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>9.0</td>\n", | |
" <td>20.00</td>\n", | |
" <td>80.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>19</th>\n", | |
" <td>130.0</td>\n", | |
" <td>14.530769</td>\n", | |
" <td>17.223649</td>\n", | |
" <td>2.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>9.0</td>\n", | |
" <td>17.00</td>\n", | |
" <td>145.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>61.0</td>\n", | |
" <td>13.426230</td>\n", | |
" <td>14.298554</td>\n", | |
" <td>3.0</td>\n", | |
" <td>5.00</td>\n", | |
" <td>9.0</td>\n", | |
" <td>19.00</td>\n", | |
" <td>82.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>21</th>\n", | |
" <td>40.0</td>\n", | |
" <td>9.125000</td>\n", | |
" <td>8.190637</td>\n", | |
" <td>3.0</td>\n", | |
" <td>4.00</td>\n", | |
" <td>7.0</td>\n", | |
" <td>9.25</td>\n", | |
" <td>40.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>22</th>\n", | |
" <td>20.0</td>\n", | |
" <td>10.100000</td>\n", | |
" <td>10.046733</td>\n", | |
" <td>3.0</td>\n", | |
" <td>4.50</td>\n", | |
" <td>5.5</td>\n", | |
" <td>12.00</td>\n", | |
" <td>46.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>23</th>\n", | |
" <td>7.0</td>\n", | |
" <td>4.714286</td>\n", | |
" <td>1.889822</td>\n", | |
" <td>2.0</td>\n", | |
" <td>3.50</td>\n", | |
" <td>5.0</td>\n", | |
" <td>6.00</td>\n", | |
" <td>7.0</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" barks \n", | |
" count mean std min 25% 50% 75% max\n", | |
"hour \n", | |
"0 1.0 3.000000 NaN 3.0 3.00 3.0 3.00 3.0\n", | |
"1 3.0 4.666667 2.081666 3.0 3.50 4.0 5.50 7.0\n", | |
"2 3.0 64.000000 99.654403 3.0 6.50 10.0 94.50 179.0\n", | |
"3 2.0 3.000000 0.000000 3.0 3.00 3.0 3.00 3.0\n", | |
"4 14.0 23.428571 50.255829 3.0 4.25 7.0 12.75 193.0\n", | |
"5 5.0 10.200000 6.797058 3.0 6.00 8.0 14.00 20.0\n", | |
"6 20.0 7.450000 8.438477 2.0 3.00 4.0 5.00 34.0\n", | |
"7 94.0 17.106383 17.334451 2.0 5.00 10.5 20.00 70.0\n", | |
"8 263.0 21.007605 22.688059 2.0 6.00 13.0 26.00 139.0\n", | |
"9 351.0 20.253561 21.585209 2.0 5.00 13.0 28.00 132.0\n", | |
"10 340.0 20.411765 20.447526 2.0 6.00 12.0 29.00 134.0\n", | |
"11 273.0 18.956044 17.807743 2.0 6.00 12.0 25.00 106.0\n", | |
"12 178.0 20.050562 20.292848 2.0 6.00 12.0 27.75 120.0\n", | |
"13 257.0 19.217899 23.706852 2.0 5.00 11.0 26.00 184.0\n", | |
"14 270.0 24.203704 24.317586 2.0 6.00 17.0 33.00 137.0\n", | |
"15 265.0 17.215094 16.314004 2.0 6.00 12.0 23.00 99.0\n", | |
"16 314.0 21.235669 21.794169 3.0 6.00 12.0 28.00 124.0\n", | |
"17 368.0 18.214674 17.294692 2.0 6.00 13.0 25.00 144.0\n", | |
"18 231.0 14.766234 14.647062 2.0 5.00 9.0 20.00 80.0\n", | |
"19 130.0 14.530769 17.223649 2.0 5.00 9.0 17.00 145.0\n", | |
"20 61.0 13.426230 14.298554 3.0 5.00 9.0 19.00 82.0\n", | |
"21 40.0 9.125000 8.190637 3.0 4.00 7.0 9.25 40.0\n", | |
"22 20.0 10.100000 10.046733 3.0 4.50 5.5 12.00 46.0\n", | |
"23 7.0 4.714286 1.889822 2.0 3.50 5.0 6.00 7.0" | |
] | |
}, | |
"execution_count": 22, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.groupby(['hour']).describe()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"df_by_hour = df.pivot_table(index='hour', aggfunc=np.sum)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAABBsAAAI/CAYAAAA2r9HeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAfXElEQVR4nO3db8yldV7f8c9XRrdUJUJ3IGSG7WAzsbKbyMqE0mxjVKpMO43QByRjUnfSbDNmg0YTk2bwie0DknlSq5u4JFS3zKYqmapbiLhWMtXYJmTZWd3KAhKmuyNMoTCuMdKaYMBvH9zXxpPhhrln+TJn5ub1Sk7OdX7nuq77dx4cDry5/lR3BwAAAGDKN6x7AgAAAMD2IjYAAAAAo8QGAAAAYJTYAAAAAIwSGwAAAIBRYgMAAAAwase6J3A+73//+3vPnj3rngYAAACw4gtf+MKfdvfOzd675GPDnj17cvLkyXVPAwAAAFhRVX/yVu85jQIAAAAYJTYAAAAAo8QGAAAAYJTYAAAAAIwSGwAAAIBRYgMAAAAwSmwAAAAARokNAAAAwCixAQAAABglNgAAAACjxAYAAABglNgAAAAAjBIbAAAAgFFiAwAAADBKbAAAAABGiQ0AAADAKLEBAAAAGCU2AAAAAKPEB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FuucDE8SG9TiT5IaV17uTvLimucDadPeLy/MrST6TjVOM4L3o5aq6PkmW51fWPB9Yi+5+ubvf6O6/TvIf4neB94Cq+sZshIZf7u7fWIb9LnDZExvW4/NJ9lbVjVX1TUkOJnlkzXOCi6qqvrmqvvVry0l+MMmX3n4r2LYeSXJoWT6U5OE1zgXW5mv/cbX45/G7wDZXVZXkl5I8090/u/KW3wUue9Xt6P11WG7l9HNJrkjyqe6+b81Tgouqqr49G0czJMmOJL/ie8B7QVX9apLvTfL+JC8n+Zkk/yXJ8SQfSPJ8kru724Xz2Nbe4rvwvdk4haKTnE7yo187bx22o6r6R0n+e5Ink/z1MvzT2bhug98FLmtiAwAAADDKaRQAAADAKLEBAAAAGCU2AAAAAKPEBgAAAGCU2AAAAACMEhsAAACAUWIDAAAAMEpsAAAAAEb9f7F+hdbQPRa/AAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 1296x720 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"fig = plt.figure(figsize=(18,10))\n", | |
"ax = fig.add_subplot(111)\n", | |
"ax.bar(df_by_hour.index, df_by_hour['barks'], label='barks', width=0.5)\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.9" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment