{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "### start to get data PK50001A100000381 from 2021-06-29 12:00:00 to 2021-06-30 00:00:00\n", "# get data from 2021-06-29 12:00:00 to 2021-06-30 00:00:00......... \n", "all data-getting done, bms_count is 0, gps_count is 503, system_count is 0, accum_count is 0 \n", "\n" ] } ], "source": [ "# 获取数据\r\n", "import sys\r\n", "import CONFIGURE.PathSetting as PathSetting\r\n", "sys.path.append(PathSetting.backend_path)\r\n", "import DBManager\r\n", "\r\n", "dbManager = DBManager.DBManager()\r\n", "df_data = dbManager.get_data(sn='PK50001A100000381', start_time='2021-06-29 12:00:00', \r\n", " end_time='2021-06-30 00:00:00', data_groups=['gps'])" ] }, { "cell_type": "code", "execution_count": 2, "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", "
时间戳定位类型卫星数纬度经度速度[km/h]海拔航向
02021-06-29 14:07:243.04.039.894867116.4128040.75561668.0170.0
12021-06-29 14:09:133.04.039.893982116.4126660.000000191.0138.0
22021-06-29 14:11:023.06.039.894615116.4129640.43707269.0100.0
32021-06-29 14:12:503.07.039.894615116.4129640.00000069.0242.0
42021-06-29 14:14:393.06.039.894615116.4129640.61856869.0126.0
...........................
4982021-06-29 22:48:103.013.039.908268116.4683760.000000109.0152.0
4992021-06-29 22:49:583.011.039.908249116.4683610.000000111.052.0
5002021-06-29 22:51:473.012.039.908249116.4683610.000000111.052.0
5012021-06-29 22:53:353.010.039.908249116.4683610.000000111.054.0
5022021-06-29 22:55:243.011.039.908241116.4683300.359288113.034.0
\n", "

503 rows × 8 columns

\n", "
" ], "text/plain": [ " 时间戳 定位类型 卫星数 纬度 经度 速度[km/h] 海拔 \\\n", "0 2021-06-29 14:07:24 3.0 4.0 39.894867 116.412804 0.755616 68.0 \n", "1 2021-06-29 14:09:13 3.0 4.0 39.893982 116.412666 0.000000 191.0 \n", "2 2021-06-29 14:11:02 3.0 6.0 39.894615 116.412964 0.437072 69.0 \n", "3 2021-06-29 14:12:50 3.0 7.0 39.894615 116.412964 0.000000 69.0 \n", "4 2021-06-29 14:14:39 3.0 6.0 39.894615 116.412964 0.618568 69.0 \n", ".. ... ... ... ... ... ... ... \n", "498 2021-06-29 22:48:10 3.0 13.0 39.908268 116.468376 0.000000 109.0 \n", "499 2021-06-29 22:49:58 3.0 11.0 39.908249 116.468361 0.000000 111.0 \n", "500 2021-06-29 22:51:47 3.0 12.0 39.908249 116.468361 0.000000 111.0 \n", "501 2021-06-29 22:53:35 3.0 10.0 39.908249 116.468361 0.000000 111.0 \n", "502 2021-06-29 22:55:24 3.0 11.0 39.908241 116.468330 0.359288 113.0 \n", "\n", " 航向 \n", "0 170.0 \n", "1 138.0 \n", "2 100.0 \n", "3 242.0 \n", "4 126.0 \n", ".. ... \n", "498 152.0 \n", "499 52.0 \n", "500 52.0 \n", "501 54.0 \n", "502 34.0 \n", "\n", "[503 rows x 8 columns]" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df_data['gps']" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "interpreter": { "hash": "82c48fa5b9935b41bc103dff27c1411e7645bc2453983fd386eae73200630fad" }, "kernelspec": { "display_name": "Python 3.7.6 64-bit ('MyQuant': conda)", "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.6" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }