{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%pip install awswrangler boto3" ] }, { "cell_type": "code", "execution_count": null, "id": "7c608617", "metadata": {}, "outputs": [], "source": [ "import awswrangler as wr" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0006c9d5ed16415222800002022-01-07 11:24:40a2_sen_cds_016ae271efreported61620221711
100158d0006c9d5ed16415135690002022-01-07 08:59:29a2_sen_cds_01ea3eb7e5reported6162022178
200158d0006c9d5ed16415105720002022-01-07 08:09:32a2_sen_cds_01cee8ce43reported6112022178
300158d0006c9d5ed16415093740002022-01-07 07:49:34a2_sen_cds_011e02ed5creported6162022177
400158d0006c9d5ed16415045910002022-01-07 06:29:51a2_sen_cds_012c5ef025reported6112022176
500158d0006c9d5ed16415042910002022-01-07 06:24:51a2_sen_cds_01b27ba489reported6162022176
600158d0006c9d5ed16415027960002022-01-07 05:59:56a2_sen_cds_01873fa701reported6112022175
700158d0006c9d5ed16414537250002022-01-06 16:22:05a2_sen_cds_01120ee414reported61120221616
800158d0006c9d5ed16414477250002022-01-06 14:42:05a2_sen_cds_01a4805270reported61620221614
900158d0006c9d5ed16414393190002022-01-06 12:21:59a2_sen_cds_01e3bb3199reported61620221612
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0006c9d5ed 1641522280000 2022-01-07 11:24:40 a2_sen_cds_01 \n", "1 00158d0006c9d5ed 1641513569000 2022-01-07 08:59:29 a2_sen_cds_01 \n", "2 00158d0006c9d5ed 1641510572000 2022-01-07 08:09:32 a2_sen_cds_01 \n", "3 00158d0006c9d5ed 1641509374000 2022-01-07 07:49:34 a2_sen_cds_01 \n", "4 00158d0006c9d5ed 1641504591000 2022-01-07 06:29:51 a2_sen_cds_01 \n", "5 00158d0006c9d5ed 1641504291000 2022-01-07 06:24:51 a2_sen_cds_01 \n", "6 00158d0006c9d5ed 1641502796000 2022-01-07 05:59:56 a2_sen_cds_01 \n", "7 00158d0006c9d5ed 1641453725000 2022-01-06 16:22:05 a2_sen_cds_01 \n", "8 00158d0006c9d5ed 1641447725000 2022-01-06 14:42:05 a2_sen_cds_01 \n", "9 00158d0006c9d5ed 1641439319000 2022-01-06 12:21:59 a2_sen_cds_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 6ae271ef reported 6 1 6 2022 1 7 11 \n", "1 ea3eb7e5 reported 6 1 6 2022 1 7 8 \n", "2 cee8ce43 reported 6 1 1 2022 1 7 8 \n", "3 1e02ed5c reported 6 1 6 2022 1 7 7 \n", "4 2c5ef025 reported 6 1 1 2022 1 7 6 \n", "5 b27ba489 reported 6 1 6 2022 1 7 6 \n", "6 873fa701 reported 6 1 1 2022 1 7 5 \n", "7 120ee414 reported 6 1 1 2022 1 6 16 \n", "8 a4805270 reported 6 1 6 2022 1 6 14 \n", "9 e3bb3199 reported 6 1 6 2022 1 6 12 " ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM illumination where device_id = '00158d0006c9d5ed' order by timestamp desc limit 10 /*3회의실조도센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 23, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typehumtempbatterystatusyearmonthdayhour
000158d00028d93d816381469540002021-11-29 09:49:14a2_sen_th_01fdc93e9creported2624901202111299
100158d00028d93d816381469540002021-11-29 09:49:14a2_sen_th_01a6fa9718reported2524901202111299
200158d00028d93d816381466530002021-11-29 09:44:13a2_sen_th_0119295a0dreported2624401202111299
300158d00028d93d816381463620002021-11-29 09:39:22a2_sen_th_015fc92dc4reported2724001202111299
400158d00028d93d816381460570002021-11-29 09:34:17a2_sen_th_016393c2bcreported2723401202111299
500158d00028d93d816381460560002021-11-29 09:34:16a2_sen_th_015f518e6creported2823401202111299
600158d00028d93d816381457560002021-11-29 09:29:16a2_sen_th_0187312dd5reported2822701202111299
700158d00028d93d816381457510002021-11-29 09:29:11a2_sen_th_0178ccec5freported2922701202111299
800158d00028d93d816381454510002021-11-29 09:24:11a2_sen_th_012967d0b3reported2921901202111299
900158d00028d93d816381451500002021-11-29 09:19:10a2_sen_th_017d5f4627reported2921101202111299
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d00028d93d8 1638146954000 2021-11-29 09:49:14 a2_sen_th_01 \n", "1 00158d00028d93d8 1638146954000 2021-11-29 09:49:14 a2_sen_th_01 \n", "2 00158d00028d93d8 1638146653000 2021-11-29 09:44:13 a2_sen_th_01 \n", "3 00158d00028d93d8 1638146362000 2021-11-29 09:39:22 a2_sen_th_01 \n", "4 00158d00028d93d8 1638146057000 2021-11-29 09:34:17 a2_sen_th_01 \n", "5 00158d00028d93d8 1638146056000 2021-11-29 09:34:16 a2_sen_th_01 \n", "6 00158d00028d93d8 1638145756000 2021-11-29 09:29:16 a2_sen_th_01 \n", "7 00158d00028d93d8 1638145751000 2021-11-29 09:29:11 a2_sen_th_01 \n", "8 00158d00028d93d8 1638145451000 2021-11-29 09:24:11 a2_sen_th_01 \n", "9 00158d00028d93d8 1638145150000 2021-11-29 09:19:10 a2_sen_th_01 \n", "\n", " id e_type hum temp battery status year month day hour \n", "0 fdc93e9c reported 26 249 0 1 2021 11 29 9 \n", "1 a6fa9718 reported 25 249 0 1 2021 11 29 9 \n", "2 19295a0d reported 26 244 0 1 2021 11 29 9 \n", "3 5fc92dc4 reported 27 240 0 1 2021 11 29 9 \n", "4 6393c2bc reported 27 234 0 1 2021 11 29 9 \n", "5 5f518e6c reported 28 234 0 1 2021 11 29 9 \n", "6 87312dd5 reported 28 227 0 1 2021 11 29 9 \n", "7 78ccec5f reported 29 227 0 1 2021 11 29 9 \n", "8 2967d0b3 reported 29 219 0 1 2021 11 29 9 \n", "9 7d5f4627 reported 29 211 0 1 2021 11 29 9 " ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM temperature_humidity where device_id = '00158d00028d93d8' order by timestamp desc limit 10 /*3회의실온습도센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0002d545b416382504080002021-11-30 14:33:28a2_sen_mt_0172e2d749reported0112021113014
100158d0002d545b416382487020002021-11-30 14:05:02a2_sen_mt_017f6500bareported0112021113014
200158d0002d545b416379138140002021-11-26 17:03:34a2_sen_mt_017374a99breported0112021112617
300158d0002d545b416379069760002021-11-26 15:09:36a2_sen_mt_01fc6ef1edreported0112021112615
400158d0002d545b416379053140002021-11-26 14:41:54a2_sen_mt_013fff6d7freported0112021112614
500158d0002d545b416379040520002021-11-26 14:20:52a2_sen_mt_01df21c92dreported0112021112614
600158d0002d545b416378852070002021-11-26 09:06:47a2_sen_mt_0154b9e9b2reported011202111269
700158d0002d545b416378828040002021-11-26 08:26:44a2_sen_mt_01f156880areported011202111268
800158d0002d545b416378824450002021-11-26 08:20:45a2_sen_mt_01622e4ab9reported011202111268
900158d0002d545b416378816500002021-11-26 08:07:30a2_sen_mt_01b5c40babreported011202111268
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0002d545b4 1638250408000 2021-11-30 14:33:28 a2_sen_mt_01 \n", "1 00158d0002d545b4 1638248702000 2021-11-30 14:05:02 a2_sen_mt_01 \n", "2 00158d0002d545b4 1637913814000 2021-11-26 17:03:34 a2_sen_mt_01 \n", "3 00158d0002d545b4 1637906976000 2021-11-26 15:09:36 a2_sen_mt_01 \n", "4 00158d0002d545b4 1637905314000 2021-11-26 14:41:54 a2_sen_mt_01 \n", "5 00158d0002d545b4 1637904052000 2021-11-26 14:20:52 a2_sen_mt_01 \n", "6 00158d0002d545b4 1637885207000 2021-11-26 09:06:47 a2_sen_mt_01 \n", "7 00158d0002d545b4 1637882804000 2021-11-26 08:26:44 a2_sen_mt_01 \n", "8 00158d0002d545b4 1637882445000 2021-11-26 08:20:45 a2_sen_mt_01 \n", "9 00158d0002d545b4 1637881650000 2021-11-26 08:07:30 a2_sen_mt_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 72e2d749 reported 0 1 1 2021 11 30 14 \n", "1 7f6500ba reported 0 1 1 2021 11 30 14 \n", "2 7374a99b reported 0 1 1 2021 11 26 17 \n", "3 fc6ef1ed reported 0 1 1 2021 11 26 15 \n", "4 3fff6d7f reported 0 1 1 2021 11 26 14 \n", "5 df21c92d reported 0 1 1 2021 11 26 14 \n", "6 54b9e9b2 reported 0 1 1 2021 11 26 9 \n", "7 f156880a reported 0 1 1 2021 11 26 8 \n", "8 622e4ab9 reported 0 1 1 2021 11 26 8 \n", "9 b5c40bab reported 0 1 1 2021 11 26 8 " ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM motion_door where device_id = '00158d0002d545b4' order by timestamp desc limit 10 /*3회의실모션센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0005bb96f316382503880002021-11-30 14:33:08a2_sen_dor_015eb49bb8reported0102021113014
100158d0005bb96f316381469630002021-11-29 09:49:23a2_sen_dor_010ee044e5reported011202111299
200158d0005bb96f316381455240002021-11-29 09:25:24a2_sen_dor_01bced6030reported010202111299
300158d0005bb96f316381452600002021-11-29 09:21:00a2_sen_dor_01dcc754bcreported011202111299
400158d0005bb96f316381450390002021-11-29 09:17:19a2_sen_dor_015ee6843ereported010202111299
500158d0005bb96f316381450350002021-11-29 09:17:15a2_sen_dor_01274ec676reported011202111299
600158d0005bb96f316381443900002021-11-29 09:06:30a2_sen_dor_01ffb89511reported010202111299
700158d0005bb96f316381427900002021-11-29 08:39:50a2_sen_dor_01cc1f5fdbreported011202111298
800158d0005bb96f316381425260002021-11-29 08:35:26a2_sen_dor_0116e525f4reported010202111298
900158d0005bb96f316379138160002021-11-26 17:03:36a2_sen_dor_017c29c17dreported0112021112617
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0005bb96f3 1638250388000 2021-11-30 14:33:08 a2_sen_dor_01 \n", "1 00158d0005bb96f3 1638146963000 2021-11-29 09:49:23 a2_sen_dor_01 \n", "2 00158d0005bb96f3 1638145524000 2021-11-29 09:25:24 a2_sen_dor_01 \n", "3 00158d0005bb96f3 1638145260000 2021-11-29 09:21:00 a2_sen_dor_01 \n", "4 00158d0005bb96f3 1638145039000 2021-11-29 09:17:19 a2_sen_dor_01 \n", "5 00158d0005bb96f3 1638145035000 2021-11-29 09:17:15 a2_sen_dor_01 \n", "6 00158d0005bb96f3 1638144390000 2021-11-29 09:06:30 a2_sen_dor_01 \n", "7 00158d0005bb96f3 1638142790000 2021-11-29 08:39:50 a2_sen_dor_01 \n", "8 00158d0005bb96f3 1638142526000 2021-11-29 08:35:26 a2_sen_dor_01 \n", "9 00158d0005bb96f3 1637913816000 2021-11-26 17:03:36 a2_sen_dor_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 5eb49bb8 reported 0 1 0 2021 11 30 14 \n", "1 0ee044e5 reported 0 1 1 2021 11 29 9 \n", "2 bced6030 reported 0 1 0 2021 11 29 9 \n", "3 dcc754bc reported 0 1 1 2021 11 29 9 \n", "4 5ee6843e reported 0 1 0 2021 11 29 9 \n", "5 274ec676 reported 0 1 1 2021 11 29 9 \n", "6 ffb89511 reported 0 1 0 2021 11 29 9 \n", "7 cc1f5fdb reported 0 1 1 2021 11 29 8 \n", "8 16e525f4 reported 0 1 0 2021 11 29 8 \n", "9 7c29c17d reported 0 1 1 2021 11 26 17 " ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM motion_door where device_id = '00158d0005bb96f3' order by timestamp desc limit 10 /*3회의실문열림센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0005a9998b16382462720002021-11-30 13:24:32a2_sen_cds_0193f9369creported0192021113013
100158d0005a9998b16382448310002021-11-30 13:00:31a2_sen_cds_01601c4eeareported01102021113013
200158d0005a9998b16382448220002021-11-30 13:00:22a2_sen_cds_017abd863ereported0192021113013
300158d0005a9998b16382447910002021-11-30 12:59:51a2_sen_cds_01ae4e0806reported0142021113012
400158d0005a9998b16382447810002021-11-30 12:59:41a2_sen_cds_01129de4aereported0152021113012
500158d0005a9998b16382444990002021-11-30 12:54:59a2_sen_cds_01cc8ff83ereported0142021113012
600158d0005a9998b16382444890002021-11-30 12:54:49a2_sen_cds_01e821a0edreported0132021113012
700158d0005a9998b16382444790002021-11-30 12:54:39a2_sen_cds_01147ee512reported0142021113012
800158d0005a9998b16382444190002021-11-30 12:53:39a2_sen_cds_01b9431dfereported0132021113012
900158d0005a9998b16382443580002021-11-30 12:52:38a2_sen_cds_017d9eb350reported0142021113012
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0005a9998b 1638246272000 2021-11-30 13:24:32 a2_sen_cds_01 \n", "1 00158d0005a9998b 1638244831000 2021-11-30 13:00:31 a2_sen_cds_01 \n", "2 00158d0005a9998b 1638244822000 2021-11-30 13:00:22 a2_sen_cds_01 \n", "3 00158d0005a9998b 1638244791000 2021-11-30 12:59:51 a2_sen_cds_01 \n", "4 00158d0005a9998b 1638244781000 2021-11-30 12:59:41 a2_sen_cds_01 \n", "5 00158d0005a9998b 1638244499000 2021-11-30 12:54:59 a2_sen_cds_01 \n", "6 00158d0005a9998b 1638244489000 2021-11-30 12:54:49 a2_sen_cds_01 \n", "7 00158d0005a9998b 1638244479000 2021-11-30 12:54:39 a2_sen_cds_01 \n", "8 00158d0005a9998b 1638244419000 2021-11-30 12:53:39 a2_sen_cds_01 \n", "9 00158d0005a9998b 1638244358000 2021-11-30 12:52:38 a2_sen_cds_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 93f9369c reported 0 1 9 2021 11 30 13 \n", "1 601c4eea reported 0 1 10 2021 11 30 13 \n", "2 7abd863e reported 0 1 9 2021 11 30 13 \n", "3 ae4e0806 reported 0 1 4 2021 11 30 12 \n", "4 129de4ae reported 0 1 5 2021 11 30 12 \n", "5 cc8ff83e reported 0 1 4 2021 11 30 12 \n", "6 e821a0ed reported 0 1 3 2021 11 30 12 \n", "7 147ee512 reported 0 1 4 2021 11 30 12 \n", "8 b9431dfe reported 0 1 3 2021 11 30 12 \n", "9 7d9eb350 reported 0 1 4 2021 11 30 12 " ] }, "execution_count": 26, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM illumination where device_id = '00158d0005a9998b' order by timestamp desc limit 10 /*연구소조도센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0002cab22516382480190002021-11-30 13:53:39a2_sen_mt_011040e7c6reported0112021113013
100158d0002cab22516382474750002021-11-30 13:44:35a2_sen_mt_014af86acfreported0112021113013
200158d0002cab22516382464380002021-11-30 13:27:18a2_sen_mt_0132b6aa68reported0112021113013
300158d0002cab22516382335370002021-11-30 09:52:17a2_sen_mt_01da53ea05reported011202111309
400158d0002cab22516382310660002021-11-30 09:11:06a2_sen_mt_01472686d4reported011202111309
500158d0002cab22516382304190002021-11-30 09:00:19a2_sen_mt_019018cbfdreported011202111309
600158d0002cab22516382270990002021-11-30 08:04:59a2_sen_mt_019b7710a8reported011202111308
700158d0002cab22516382177270002021-11-30 05:28:47a2_sen_mt_014805e5b3reported011202111305
800158d0002cab22516382077050002021-11-30 02:41:45a2_sen_mt_01de5f7e04reported011202111302
900158d0002cab22516381778740002021-11-29 18:24:34a2_sen_mt_01fa93d91dreported0112021112918
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0002cab225 1638248019000 2021-11-30 13:53:39 a2_sen_mt_01 \n", "1 00158d0002cab225 1638247475000 2021-11-30 13:44:35 a2_sen_mt_01 \n", "2 00158d0002cab225 1638246438000 2021-11-30 13:27:18 a2_sen_mt_01 \n", "3 00158d0002cab225 1638233537000 2021-11-30 09:52:17 a2_sen_mt_01 \n", "4 00158d0002cab225 1638231066000 2021-11-30 09:11:06 a2_sen_mt_01 \n", "5 00158d0002cab225 1638230419000 2021-11-30 09:00:19 a2_sen_mt_01 \n", "6 00158d0002cab225 1638227099000 2021-11-30 08:04:59 a2_sen_mt_01 \n", "7 00158d0002cab225 1638217727000 2021-11-30 05:28:47 a2_sen_mt_01 \n", "8 00158d0002cab225 1638207705000 2021-11-30 02:41:45 a2_sen_mt_01 \n", "9 00158d0002cab225 1638177874000 2021-11-29 18:24:34 a2_sen_mt_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 1040e7c6 reported 0 1 1 2021 11 30 13 \n", "1 4af86acf reported 0 1 1 2021 11 30 13 \n", "2 32b6aa68 reported 0 1 1 2021 11 30 13 \n", "3 da53ea05 reported 0 1 1 2021 11 30 9 \n", "4 472686d4 reported 0 1 1 2021 11 30 9 \n", "5 9018cbfd reported 0 1 1 2021 11 30 9 \n", "6 9b7710a8 reported 0 1 1 2021 11 30 8 \n", "7 4805e5b3 reported 0 1 1 2021 11 30 5 \n", "8 de5f7e04 reported 0 1 1 2021 11 30 2 \n", "9 fa93d91d reported 0 1 1 2021 11 29 18 " ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM motion_door where device_id = '00158d0002cab225' order by timestamp desc limit 10 /*연구소모션센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0005bb968a16382475190002021-11-30 13:45:19a2_sen_dor_01c4f0d490reported0102021113013
100158d0005bb968a16382475140002021-11-30 13:45:14a2_sen_dor_0124500391reported0112021113013
200158d0005bb968a16382474830002021-11-30 13:44:43a2_sen_dor_01a1f435abreported0102021113013
300158d0005bb968a16382474790002021-11-30 13:44:39a2_sen_dor_0126db99c3reported0112021113013
400158d0005bb968a16382466650002021-11-30 13:31:05a2_sen_dor_01df9ef5b4reported0102021113013
500158d0005bb968a16382466620002021-11-30 13:31:02a2_sen_dor_012fa18fc4reported0112021113013
600158d0005bb968a16382464490002021-11-30 13:27:29a2_sen_dor_01c8ad680breported0102021113013
700158d0005bb968a16382464470002021-11-30 13:27:27a2_sen_dor_0192f56584reported0112021113013
800158d0005bb968a16382461300002021-11-30 13:22:10a2_sen_dor_01ee0271a4reported0102021113013
900158d0005bb968a16382461260002021-11-30 13:22:06a2_sen_dor_014aaeaed6reported0112021113013
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0005bb968a 1638247519000 2021-11-30 13:45:19 a2_sen_dor_01 \n", "1 00158d0005bb968a 1638247514000 2021-11-30 13:45:14 a2_sen_dor_01 \n", "2 00158d0005bb968a 1638247483000 2021-11-30 13:44:43 a2_sen_dor_01 \n", "3 00158d0005bb968a 1638247479000 2021-11-30 13:44:39 a2_sen_dor_01 \n", "4 00158d0005bb968a 1638246665000 2021-11-30 13:31:05 a2_sen_dor_01 \n", "5 00158d0005bb968a 1638246662000 2021-11-30 13:31:02 a2_sen_dor_01 \n", "6 00158d0005bb968a 1638246449000 2021-11-30 13:27:29 a2_sen_dor_01 \n", "7 00158d0005bb968a 1638246447000 2021-11-30 13:27:27 a2_sen_dor_01 \n", "8 00158d0005bb968a 1638246130000 2021-11-30 13:22:10 a2_sen_dor_01 \n", "9 00158d0005bb968a 1638246126000 2021-11-30 13:22:06 a2_sen_dor_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 c4f0d490 reported 0 1 0 2021 11 30 13 \n", "1 24500391 reported 0 1 1 2021 11 30 13 \n", "2 a1f435ab reported 0 1 0 2021 11 30 13 \n", "3 26db99c3 reported 0 1 1 2021 11 30 13 \n", "4 df9ef5b4 reported 0 1 0 2021 11 30 13 \n", "5 2fa18fc4 reported 0 1 1 2021 11 30 13 \n", "6 c8ad680b reported 0 1 0 2021 11 30 13 \n", "7 92f56584 reported 0 1 1 2021 11 30 13 \n", "8 ee0271a4 reported 0 1 0 2021 11 30 13 \n", "9 4aaeaed6 reported 0 1 1 2021 11 30 13 " ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM motion_door where device_id = '00158d0005bb968a' order by timestamp desc limit 10 /*연구소문열림센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typehumtempbatterystatusyearmonthdayhour
000158d00049b8ff316375582530002021-11-22 14:17:33a2_sen_th_01683fa131reported29226012021112214
100158d00049b8ff316375579520002021-11-22 14:12:32a2_sen_th_012ac12530reported29228012021112214
200158d00049b8ff316375579520002021-11-22 14:12:32a2_sen_th_0142741e86reported30228012021112214
300158d00049b8ff316375573500002021-11-22 14:02:30a2_sen_th_0124c99ff6reported30229012021112214
400158d00049b8ff316375567490002021-11-22 13:52:29a2_sen_th_01413bb2a0reported30228012021112213
500158d00049b8ff316375561470002021-11-22 13:42:27a2_sen_th_016ea69ba3reported29228012021112213
600158d00049b8ff316375558460002021-11-22 13:37:26a2_sen_th_013f9e8043reported29227012021112213
700158d00049b8ff316375549430002021-11-22 13:22:23a2_sen_th_01bb276ddareported29226012021112213
800158d00049b8ff316375546420002021-11-22 13:17:22a2_sen_th_0114445641reported29225012021112213
900158d00049b8ff316375537390002021-11-22 13:02:19a2_sen_th_015ccc4310reported28225012021112213
\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d00049b8ff3 1637558253000 2021-11-22 14:17:33 a2_sen_th_01 \n", "1 00158d00049b8ff3 1637557952000 2021-11-22 14:12:32 a2_sen_th_01 \n", "2 00158d00049b8ff3 1637557952000 2021-11-22 14:12:32 a2_sen_th_01 \n", "3 00158d00049b8ff3 1637557350000 2021-11-22 14:02:30 a2_sen_th_01 \n", "4 00158d00049b8ff3 1637556749000 2021-11-22 13:52:29 a2_sen_th_01 \n", "5 00158d00049b8ff3 1637556147000 2021-11-22 13:42:27 a2_sen_th_01 \n", "6 00158d00049b8ff3 1637555846000 2021-11-22 13:37:26 a2_sen_th_01 \n", "7 00158d00049b8ff3 1637554943000 2021-11-22 13:22:23 a2_sen_th_01 \n", "8 00158d00049b8ff3 1637554642000 2021-11-22 13:17:22 a2_sen_th_01 \n", "9 00158d00049b8ff3 1637553739000 2021-11-22 13:02:19 a2_sen_th_01 \n", "\n", " id e_type hum temp battery status year month day hour \n", "0 683fa131 reported 29 226 0 1 2021 11 22 14 \n", "1 2ac12530 reported 29 228 0 1 2021 11 22 14 \n", "2 42741e86 reported 30 228 0 1 2021 11 22 14 \n", "3 24c99ff6 reported 30 229 0 1 2021 11 22 14 \n", "4 413bb2a0 reported 30 228 0 1 2021 11 22 13 \n", "5 6ea69ba3 reported 29 228 0 1 2021 11 22 13 \n", "6 3f9e8043 reported 29 227 0 1 2021 11 22 13 \n", "7 bb276dda reported 29 226 0 1 2021 11 22 13 \n", "8 14445641 reported 29 225 0 1 2021 11 22 13 \n", "9 5ccc4310 reported 28 225 0 1 2021 11 22 13 " ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = wr.athena.read_sql_query(\n", " sql=\"SELECT * FROM temperature_humidity where device_id = '00158d0006c9d545' order by timestamp desc limit 10 /*연구소온습도센서*/;\",\n", " database=\"ambt_b2c\"\n", ")\n", "df" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "datetime.datetime(2021, 11, 30, 8, 8, 45)" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import datetime\n", "datetimeobj = datetime.datetime.fromtimestamp(1638227325000/1000)\n", "datetimeobj" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "from datetime import datetime\n", "datetime.now().hour\n", "if datetime.now().weekday() < 5 :\n", " if datetime.now().hour > 8 and datetime.now().hour < 17 :\n", " print ('working time') " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 67, "metadata": {}, "outputs": [], "source": [ "a = datetime(datetime.now().year, datetime.now().month, datetime.now().day, datetime.now().hour)" ] }, { "cell_type": "code", "execution_count": 68, "metadata": {}, "outputs": [], "source": [ "b = datetime(int(df['year'][0]), int(df['month'][0]), int(df['day'][0]), int(df['hour'][0]))" ] }, { "cell_type": "code", "execution_count": 73, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "2021-11-25 13:00:00\n" ] } ], "source": [ "print('{}'.format(b))" ] }, { "cell_type": "code", "execution_count": 69, "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "not same\n" ] } ], "source": [ "if a!=b:\n", " print('not same')" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'13'" ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.head(1)['hour'][0]" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'2021'" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df['year'][0]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 56, "metadata": {}, "outputs": [], "source": [ "a = datetime(datetime.now().year, datetime.now().month, datetime.now().day, datetime.now().hour)" ] }, { "cell_type": "code", "execution_count": 57, "metadata": {}, "outputs": [], "source": [ "b = datetime(int(df['year'][0]), int(df['month'][0]), int(df['day'][0]), int(df['hour'][0]))" ] }, { "cell_type": "code", "execution_count": 65, "metadata": { "scrolled": true }, "outputs": [], "source": [ "if a!=b:\n", " print('same')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import awswrangler as wr\n", "df = wr.s3.read_parquet(\"s3://hdci-prototyping/motion_door/\", dataset=True)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
device_idsktimestampmodelide_typebatterystatusevtyearmonthdayhour
000158d0005bb968a16338220040002021-10-10 08:26:44a2_sen_dor_01b087f0a8reported010202110108
100158d0002cab22516340004510002021-10-12 10:00:51a2_sen_mt_01c6a1edc2reported0102021101210
200158d0002cab22516340008250002021-10-12 10:07:05a2_sen_mt_017b442366reported0112021101210
300158d0002cab22516340008860002021-10-12 10:08:06a2_sen_mt_01ab3c5929reported0102021101210
400158d0002cab22516340039530002021-10-12 10:59:13a2_sen_mt_010cdda406reported0112021101210
..........................................
826900158d0006c9d66516311457280002021-09-09 09:02:08a2_sen_dor_012a101ef0reported6102021999
827000158d0005bb968a16311488190002021-09-09 09:53:39a2_sen_dor_012838e8ccreported0112021999
827100158d0005bb96f316311488630002021-09-09 09:54:23a2_sen_dor_017af0ae63reported0112021999
827200158d0006c9d66516311488690002021-09-09 09:54:29a2_sen_dor_013d8375e2reported6102021999
827300158d0002d545b416311490650002021-09-09 09:57:45a2_sen_mt_0199fb428freported0112021999
\n", "

8274 rows × 13 columns

\n", "
" ], "text/plain": [ " device_id sk timestamp model \\\n", "0 00158d0005bb968a 1633822004000 2021-10-10 08:26:44 a2_sen_dor_01 \n", "1 00158d0002cab225 1634000451000 2021-10-12 10:00:51 a2_sen_mt_01 \n", "2 00158d0002cab225 1634000825000 2021-10-12 10:07:05 a2_sen_mt_01 \n", "3 00158d0002cab225 1634000886000 2021-10-12 10:08:06 a2_sen_mt_01 \n", "4 00158d0002cab225 1634003953000 2021-10-12 10:59:13 a2_sen_mt_01 \n", "... ... ... ... ... \n", "8269 00158d0006c9d665 1631145728000 2021-09-09 09:02:08 a2_sen_dor_01 \n", "8270 00158d0005bb968a 1631148819000 2021-09-09 09:53:39 a2_sen_dor_01 \n", "8271 00158d0005bb96f3 1631148863000 2021-09-09 09:54:23 a2_sen_dor_01 \n", "8272 00158d0006c9d665 1631148869000 2021-09-09 09:54:29 a2_sen_dor_01 \n", "8273 00158d0002d545b4 1631149065000 2021-09-09 09:57:45 a2_sen_mt_01 \n", "\n", " id e_type battery status evt year month day hour \n", "0 b087f0a8 reported 0 1 0 2021 10 10 8 \n", "1 c6a1edc2 reported 0 1 0 2021 10 12 10 \n", "2 7b442366 reported 0 1 1 2021 10 12 10 \n", "3 ab3c5929 reported 0 1 0 2021 10 12 10 \n", "4 0cdda406 reported 0 1 1 2021 10 12 10 \n", "... ... ... ... ... ... ... ... .. ... \n", "8269 2a101ef0 reported 6 1 0 2021 9 9 9 \n", "8270 2838e8cc reported 0 1 1 2021 9 9 9 \n", "8271 7af0ae63 reported 0 1 1 2021 9 9 9 \n", "8272 3d8375e2 reported 6 1 0 2021 9 9 9 \n", "8273 99fb428f reported 0 1 1 2021 9 9 9 \n", "\n", "[8274 rows x 13 columns]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "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.8.8" } }, "nbformat": 4, "nbformat_minor": 5 }