数据库作业 用Python读取Excel 数据 存放到mysql中
作业
- 用Python读取Excel 数据 存放到mysql中
- 数据集
用Python读取Excel 数据 存放到mysql中
import pymysql
import openpyxl
import datetime
from pymysql.cursors import DictCursordef main():conn = pymysql.Connect(host='localhost',port=3306,user='root',password='xxxxxx',database='ali', # 默认使用school 相当于use school;charset='utf8mb4',autocommit=True)# 建立链接游标print('开始建表......')with conn.cursor(DictCursor) as cursor:cursor.execute('''create table if not exists tb_stock(s_date date not null comment '日期',s_open decimal(10,6) unsigned not null comment '开盘价',s_high decimal(10,6) unsigned not null comment '最高价',s_low decimal(10,6) unsigned not null comment '最低价',s_close decimal(10,6) unsigned not null comment '收盘价',s_adjcolse decimal(10,6) unsigned not null comment '调整后的收盘价',s_volume int unsigned not null comment '成交量',primary key (s_date))engine=innodb;''')print('表建立完成!')# 数据准备,获取表对象,行数列数work_book = openpyxl.load_workbook('files/阿里巴巴2017年股票数据.xlsx')name = work_book.sheetnames[0]sheet = work_book[name]rows = sheet.max_rowcolumns = sheet.max_column#数据写入datas=list(sheet.iter_rows())for x in datas[1:]:data=[item.value for item in x[1:]]data.insert(0,x[0].value.strftime("%Y-%m-%d %H:%M:%S"))cursor.execute(f"""insert into tb_stock values ('{data[0]}',{data[1]},{data[2]},{data[3]},{data[4]},{data[5]},{data[6]});""")if __name__ == '__main__':main()
数据集
Date Open High Low Close Adj Close Volume
2017-01-03 0:00:00 89 89 88.080002 88.599998 88.599998 8789400
2017-01-04 0:00:00 88.985001 90.889999 88.580002 90.510002 90.510002 11490200
2017-01-05 0:00:00 91.910004 94.809998 91.639999 94.370003 94.370003 16821500
2017-01-06 0:00:00 94.400002 94.5 93 93.889999 93.889999 7639800
2017-01-09 0:00:00 94.160004 95.650002 93.309998 94.720001 94.720001 10792900
2017-01-10 0:00:00 96.400002 97.903999 95.550003 96.75 96.75 14780600
2017-01-11 0:00:00 96.919998 97.449997 95.599998 96.940002 96.940002 8735900
2017-01-12 0:00:00 96.849998 96.849998 94.800003 95.900002 95.900002 8424700
2017-01-13 0:00:00 95.949997 97.379997 95.760002 96.269997 96.269997 10701100
2017-01-17 0:00:00 96.32 96.589996 95 96.120003 96.120003 6301600
2017-01-18 0:00:00 96.269997 96.269997 95.260002 96 96 6610700
2017-01-19 0:00:00 96.419998 96.699997 95.580002 96.169998 96.169998 7090000
2017-01-20 0:00:00 96.449997 97.150002 95.670998 96.059998 96.059998 9685800
2017-01-23 0:00:00 96.480003 98.669998 96.260002 98.410004 98.410004 14090300
2017-01-24 0:00:00 103.150002 103.190002 99.940002 101.43 101.43 37181500
2017-01-25 0:00:00 102.459999 104.269997 101.900002 104.059998 104.059998 23322800
2017-01-26 0:00:00 103.919998 104.57 102.169998 102.75 102.75 12504800
2017-01-27 0:00:00 102.25 102.699997 101.290001 102.07 102.07 8031000
2017-01-30 0:00:00 101.199997 101.459999 100.089996 101.019997 101.019997 8619800
2017-01-31 0:00:00 100.239998 102.089996 100.059998 101.309998 101.309998 7530000
2017-02-01 0:00:00 102.07 102.379997 100.870003 101.57 101.57 5736400
2017-02-02 0:00:00 101.279999 101.470001 100.559998 100.839996 100.839996 5371600
2017-02-03 0:00:00 101.5 101.559998 100.300003 100.389999 100.389999 6197600
2017-02-06 0:00:00 100.169998 101.706001 100.019997 100.900002 100.900002 6866700
2017-02-07 0:00:00 101.040001 101.599998 100.5 100.830002 100.830002 5655600
2017-02-08 0:00:00 101.550003 103.989998 101.160004 103.57 103.57 10178500
2017-02-09 0:00:00 103.57 104.18 102.559998 103.339996 103.339996 8435800
2017-02-10 0:00:00 103.879997 103.940002 102.309998 102.360001 102.360001 7680300
2017-02-13 0:00:00 102.82 104.440002 102.620003 103.099998 103.099998 9729000
2017-02-14 0:00:00 103.139999 103.599998 100.896004 101.589996 101.589996 10192100
2017-02-15 0:00:00 102.059998 102.129997 100.110001 101.550003 101.550003 12384400
2017-02-16 0:00:00 101.860001 102.099998 100.5 100.82 100.82 7464000
2017-02-17 0:00:00 100.690002 101.730003 100.300003 100.519997 100.519997 8258200
2017-02-21 0:00:00 101.029999 102.540001 100.910004 102.120003 102.120003 8189600
2017-02-22 0:00:00 102.480003 105.199997 102.419998 104.199997 104.199997 15779400
2017-02-23 0:00:00 104.720001 104.860001 101.82 102.459999 102.459999 10095600
2017-02-24 0:00:00 101.389999 103 101.300003 102.949997 102.949997 7356600
2017-02-27 0:00:00 102.5 103.824997 102.220001 103.599998 103.599998 6865900
2017-02-28 0:00:00 103.889999 103.989998 102.029999 102.900002 102.900002 8017500
2017-03-01 0:00:00 103.68 104.989998 103.209999 104.040001 104.040001 10331800
2017-03-02 0:00:00 103.800003 104.580002 102.769997 103.190002 103.190002 7983000
2017-03-03 0:00:00 102.989998 103.419998 102.440002 103.309998 103.309998 6320900
2017-03-06 0:00:00 102.760002 103.25 102.099998 102.309998 102.309998 6290700
2017-03-07 0:00:00 102.300003 103.307999 102.110001 102.629997 102.629997 4985200
2017-03-08 0:00:00 102.629997 104.290001 102.540001 103.220001 103.220001 7066700
2017-03-09 0:00:00 102.970001 103.75 102.760002 103.239998 103.239998 4523600
2017-03-10 0:00:00 103.43 103.699997 102.629997 103.389999 103.389999 4120700
2017-03-13 0:00:00 103.519997 106.25 103.470001 105.18 105.18 16118900
2017-03-14 0:00:00 104.610001 106 103.821999 104.25 104.25 7748400
2017-03-15 0:00:00 104.370003 104.489998 102.599998 103.690002 103.690002 11695200
2017-03-16 0:00:00 105.25 105.650002 104.301003 105.629997 105.629997 12445200
2017-03-17 0:00:00 105.169998 106.5 104.860001 105.610001 105.610001 8778900
2017-03-20 0:00:00 106.230003 108.199997 105.940002 107.25 107.25 12447900
2017-03-21 0:00:00 108.459999 108.699997 104.699997 105.089996 105.089996 13877700
2017-03-22 0:00:00 104.639999 106.120003 103.980003 106.089996 106.089996 7153000
2017-03-23 0:00:00 106.949997 108.830002 106.440002 108.25 108.25 13410800
2017-03-24 0:00:00 108.400002 109.129997 107.230003 108.040001 108.040001 7578400
2017-03-27 0:00:00 106.650002 108.190002 106.510002 108.080002 108.080002 7709400
2017-03-28 0:00:00 108.230003 108.949997 107.459999 107.800003 107.800003 6472000
2017-03-29 0:00:00 107.970001 109.739998 107.690002 109.510002 109.510002 8788700
2017-03-30 0:00:00 109.728996 110.449997 108.660004 108.849998 108.849998 10592500
2017-03-31 0:00:00 108.5 109.119003 107.779999 107.830002 107.830002 9002800
2017-04-03 0:00:00 108.849998 109.470001 107.519997 108.089996 108.089996 8391400
2017-04-04 0:00:00 107.870003 108.260002 106.879997 107.519997 107.519997 6480100
2017-04-05 0:00:00 108.360001 108.82 107.32 107.440002 107.440002 8205400
2017-04-06 0:00:00 107.589996 108.419998 107.150002 108.040001 108.040001 5211100
2017-04-07 0:00:00 107.879997 109.07 106.760002 108.989998 108.989998 8354900
2017-04-10 0:00:00 109 111.879997 108.839996 111.699997 111.699997 14798600
2017-04-11 0:00:00 111.400002 111.790001 109.459999 110.440002 110.440002 10012100
2017-04-12 0:00:00 110.5 111.699997 110.309998 110.629997 110.629997 8099800
2017-04-13 0:00:00 110.720001 111.449997 109.82 110.209999 110.209999 6857000
2017-04-17 0:00:00 110.910004 111.870003 110.300003 111.760002 111.760002 7128100
2017-04-18 0:00:00 111.199997 112.199997 110.866997 111.230003 111.230003 8305100
2017-04-19 0:00:00 111.989998 112.199997 110.57 110.760002 110.760002 9603800
2017-04-20 0:00:00 111.529999 113.599998 111.480003 112.959999 112.959999 13773500
2017-04-21 0:00:00 112.800003 113.169998 112.300003 113.110001 113.110001 8968300
2017-04-24 0:00:00 114.040001 115.160004 114.019997 114.860001 114.860001 13386600
2017-04-25 0:00:00 115.540001 115.82 114.800003 115.480003 115.480003 11434600
2017-04-26 0:00:00 115.370003 115.75 114.622002 114.970001 114.970001 6678800
2017-04-27 0:00:00 115 115.959999 114.830002 115.43 115.43 9441500
2017-04-28 0:00:00 115.900002 115.989998 115 115.5 115.5 6955700
2017-05-01 0:00:00 115.629997 117.239998 115.5 116.68 116.68 7332100
2017-05-02 0:00:00 117.07 118.690002 117 118.089996 118.089996 10048200
2017-05-03 0:00:00 117.949997 118 115.120003 116.57 116.57 10591100
2017-05-04 0:00:00 115.940002 116.410004 115.150002 115.860001 115.860001 6977800
2017-05-05 0:00:00 116.050003 116.150002 114.800003 116.040001 116.040001 7099400
2017-05-08 0:00:00 116.900002 117.510002 116.199997 116.860001 116.860001 6461900
2017-05-09 0:00:00 118.620003 120 118.07 120 120 15219900
2017-05-10 0:00:00 120.010002 120.330002 119.099998 119.980003 119.980003 9347300
2017-05-11 0:00:00 120.129997 120.5 118.25 120.160004 120.160004 11375500
2017-05-12 0:00:00 120.160004 120.468002 119.510002 120.339996 120.339996 9823900
2017-05-15 0:00:00 121.029999 121.489998 120.030998 121.400002 121.400002 11125500
2017-05-16 0:00:00 121.980003 124.339996 121.739998 124.019997 124.019997 18222100
2017-05-17 0:00:00 123.25 123.889999 120.5 120.720001 120.720001 19834700
2017-05-18 0:00:00 116.309998 122.629997 114 121.269997 121.269997 37121900
2017-05-19 0:00:00 123.959999 126.400002 123.07 123.220001 123.220001 21101700
2017-05-22 0:00:00 124.980003 125.589996 123.555 124.75 124.75 13493200
2017-05-23 0:00:00 124.669998 125.675003 122.849998 122.93 122.93 14370100
2017-05-24 0:00:00 123.07 123.683998 121.949997 122.809998 122.809998 8371500
2017-05-25 0:00:00 123.739998 124.449997 122.309998 123.629997 123.629997 12486500
2017-05-26 0:00:00 123.93 124.650002 123.099998 123.989998 123.989998 7558900
2017-05-30 0:00:00 124.080002 124.879997 123.529999 123.910004 123.910004 8343400
2017-05-31 0:00:00 123.639999 124.175003 122 122.459999 122.459999 11582200
2017-06-01 0:00:00 122.82 124 122.260002 123.970001 123.970001 8901400
2017-06-02 0:00:00 123.720001 124.529999 123.239998 124.129997 124.129997 7342100
2017-06-05 0:00:00 124.019997 125.559998 123.870003 125.370003 125.370003 10030600
2017-06-06 0:00:00 125.370003 126.199997 124.269997 124.620003 124.620003 9257100
2017-06-07 0:00:00 125.080002 125.910004 124.110001 125.639999 125.639999 9431600
2017-06-08 0:00:00 142.509995 143.699997 135.210007 142.339996 142.339996 80936900
2017-06-09 0:00:00 142.339996 148.289993 137.009995 139.440002 139.440002 54367400
2017-06-12 0:00:00 139.169998 139.389999 136.050003 139.080002 139.080002 32177600
2017-06-13 0:00:00 141.880005 142.244003 135.899994 136.600006 136.600006 40879600
2017-06-14 0:00:00 137.800003 139.25 135.259995 136.669998 136.669998 32862000
2017-06-15 0:00:00 135.639999 135.669998 133.100006 135.080002 135.080002 30510400
2017-06-16 0:00:00 136.279999 136.5 133.550003 134.869995 134.869995 36431300
2017-06-19 0:00:00 137.809998 140.399994 137.399994 139.470001 139.470001 24951600
2017-06-20 0:00:00 140.080002 140.630005 137.929993 138.380005 138.380005 20580500
2017-06-21 0:00:00 138.820007 143.5 138.020004 143.289993 143.289993 30911600
2017-06-22 0:00:00 142.050003 144.679993 140.880005 142.270004 142.270004 21897600
2017-06-23 0:00:00 142.100006 143.339996 141.600006 143.009995 143.009995 11759000
2017-06-26 0:00:00 144.029999 145.360001 141.270004 142.729996 142.729996 17828100
2017-06-27 0:00:00 143.899994 144.380005 141.100006 141.529999 141.529999 17374800
2017-06-28 0:00:00 142.649994 144.369995 141.479996 143.949997 143.949997 17759800
2017-06-29 0:00:00 143.160004 143.559998 137.520004 140.809998 140.809998 24130300
2017-06-30 0:00:00 141.029999 142.380005 139.919998 140.899994 140.899994 12276700
2017-07-03 0:00:00 141.75 142.490005 139.494995 140.990005 140.990005 6975700
2017-07-05 0:00:00 141.160004 145 140.330002 144.869995 144.869995 16995800
2017-07-06 0:00:00 143.009995 143.619995 141.830002 142.199997 142.199997 11934200
2017-07-07 0:00:00 142.649994 143.378998 141.830994 142.429993 142.429993 8046200
2017-07-10 0:00:00 143 144.160004 142.25 143.809998 143.809998 10351500
2017-07-11 0:00:00 144.289993 145.869995 143.259995 145.809998 145.809998 13519900
2017-07-12 0:00:00 147.380005 149.300003 146.850006 149 149 14955800
2017-07-13 0:00:00 149.520004 150 148 149.520004 149.520004 11683400
2017-07-14 0:00:00 150.119995 152.25 149.690002 151.830002 151.830002 11469400
2017-07-17 0:00:00 153.529999 153.699997 150.419998 151.229996 151.229996 15342700
2017-07-18 0:00:00 151.080002 154.600006 150.479996 153.75 153.75 15313000
2017-07-19 0:00:00 155.139999 156.410004 152.639999 153.149994 153.149994 16896100
2017-07-20 0:00:00 153.960007 154.119995 151.839996 152.110001 152.110001 16739800
2017-07-21 0:00:00 151.789993 152.149994 150.309998 151.889999 151.889999 11452700
2017-07-24 0:00:00 152.770004 153.229996 151.600006 152.259995 152.259995 10649100
2017-07-25 0:00:00 152.360001 152.75 150.850006 152.440002 152.440002 8460300
2017-07-26 0:00:00 152.529999 156 152.360001 155.789993 155.789993 14466300
2017-07-27 0:00:00 157.850006 160.389999 151.330002 154.149994 154.149994 26058500
2017-07-28 0:00:00 153.960007 158.960007 152.820007 157.559998 157.559998 14449400
2017-07-31 0:00:00 158.899994 159.389999 153.5 154.949997 154.949997 17782400
2017-08-01 0:00:00 156.25 156.610001 153.800003 154.729996 154.729996 12035300
2017-08-02 0:00:00 155.470001 155.75 149.100006 151.910004 151.910004 19529300
2017-08-03 0:00:00 152.100006 153.800003 149.600006 153.320007 153.320007 12435400
2017-08-04 0:00:00 154.320007 154.320007 152.160004 153.330002 153.330002 10035600
2017-08-07 0:00:00 154.830002 158.990005 154.369995 158.839996 158.839996 15906400
2017-08-08 0:00:00 158.559998 159.839996 156.800003 157.5 157.5 15447100
2017-08-09 0:00:00 156.050003 157.710007 155.199997 157.490005 157.490005 11022600
2017-08-10 0:00:00 156.199997 156.5 151.25 151.770004 151.770004 19298900
2017-08-11 0:00:00 150.509995 152.570007 147.5 151.699997 151.699997 22327400
2017-08-14 0:00:00 154.770004 155.080002 153.100006 154.610001 154.610001 14601800
2017-08-15 0:00:00 155.740005 158.320007 154 157.75 157.75 18635700
2017-08-16 0:00:00 160 160.350006 158.535004 159.5 159.5 21318300
2017-08-17 0:00:00 166.119995 168 163.509995 163.919998 163.919998 56840300
2017-08-18 0:00:00 165.360001 169.5 164.100006 167.5 167.5 31492500
2017-08-21 0:00:00 168.289993 170.600006 166.979996 169.25 169.25 22352300
2017-08-22 0:00:00 170.020004 174.770004 169.639999 174.460007 174.460007 24481900
2017-08-23 0:00:00 172.899994 176.229996 172.75 175.800003 175.800003 21939000
2017-08-24 0:00:00 177 177 174.300003 175 175 20795200
2017-08-25 0:00:00 174.800003 174.940002 171.110001 171.740005 171.740005 24184700
2017-08-28 0:00:00 171.149994 171.339996 167.059998 168.300003 168.300003 24615900
2017-08-29 0:00:00 165.149994 169.229996 164.350006 167.410004 167.410004 19587300
2017-08-30 0:00:00 169.149994 172.389999 169.149994 171.25 171.25 17770000
2017-08-31 0:00:00 172.539993 172.899994 170.25 171.740005 171.740005 16486800
2017-09-01 0:00:00 171.990005 172.386002 170.649994 171.039993 171.039993 11166600
2017-09-05 0:00:00 169.470001 171.929993 168.738007 169.919998 169.919998 14943600
2017-09-06 0:00:00 170.169998 171.110001 167 168.139999 168.139999 19988300
2017-09-07 0:00:00 169.259995 170.970001 168 170.479996 170.479996 15141900
2017-09-08 0:00:00 169.990005 171.220001 168.919998 169 169 12345300
2017-09-11 0:00:00 171.5 174.199997 171.5 174.059998 174.059998 18257900
2017-09-12 0:00:00 174.889999 175.619995 173.369995 175.309998 175.309998 15629700
2017-09-13 0:00:00 175.75 179.100006 175.559998 178.970001 178.970001 22060700
2017-09-14 0:00:00 177.539993 179.929993 176.020004 177.100006 177.100006 22827700
2017-09-15 0:00:00 177.899994 179.75 176.699997 176.699997 176.699997 26567600
2017-09-18 0:00:00 178.889999 180.289993 177.75 179.979996 179.979996 22919800
2017-09-19 0:00:00 180.690002 180.869995 179.25 180.070007 180.070007 14751900
2017-09-20 0:00:00 180.020004 180.5 176.151001 177.949997 177.949997 15396700
2017-09-21 0:00:00 178.050003 178.860992 175.300003 177.389999 177.389999 14578800
2017-09-22 0:00:00 176.199997 178.419998 175.679993 178.139999 178.139999 12749700
2017-09-25 0:00:00 176.479996 177 167.5 169.589996 169.589996 34033700
2017-09-26 0:00:00 170.009995 171.899994 166.789993 167.020004 167.020004 23696200
2017-09-27 0:00:00 169.839996 171.949997 169.449997 170.990005 170.990005 19444200
2017-09-28 0:00:00 170.910004 171.880005 169.567001 170.240005 170.240005 13957000
2017-09-29 0:00:00 171.110001 173.539993 170.740005 172.710007 172.710007 13401800
2017-10-02 0:00:00 174.570007 175.130005 172.570007 173.610001 173.610001 12563400
2017-10-03 0:00:00 176.059998 178.779999 173.610001 178.559998 178.559998 16714600
2017-10-04 0:00:00 178.059998 180 177.300003 178.710007 178.710007 11420600
2017-10-05 0:00:00 179 179.729996 176.029999 178.889999 178.889999 11895300
2017-10-06 0:00:00 177.850006 179.869995 177.610001 179.199997 179.199997 8749300
2017-10-09 0:00:00 178.970001 183.132004 178.75 182.089996 182.089996 15011600
2017-10-10 0:00:00 181.649994 184.460007 181.360001 183.119995 183.119995 13201300
2017-10-11 0:00:00 183 184.699997 182.600998 184.690002 184.690002 11974400
2017-10-12 0:00:00 184.039993 184.389999 180.348007 180.529999 180.529999 15441200
2017-10-13 0:00:00 180.960007 181.399994 177.970001 178.449997 178.449997 18107700
2017-10-16 0:00:00 180 180.050003 178.509995 179.559998 179.559998 12855900
2017-10-17 0:00:00 179.580002 180.119995 175.300003 175.320007 175.320007 20132200
2017-10-18 0:00:00 177.089996 180 176.279999 179.610001 179.610001 21736500
2017-10-19 0:00:00 177.001007 179.610001 175.449997 177.929993 177.929993 13539000
2017-10-20 0:00:00 179.020004 179.520004 177.080002 177.320007 177.320007 11953200
2017-10-23 0:00:00 177.800003 178.009995 173.050003 173.130005 173.130005 17610900
2017-10-24 0:00:00 174 175.979996 173.259995 173.699997 173.699997 11946000
2017-10-25 0:00:00 174.690002 175.440002 169.300003 170.220001 170.220001 18109400
2017-10-26 0:00:00 170.619995 171.449997 168.580002 170.320007 170.320007 13527400
2017-10-27 0:00:00 173.190002 177 171.110001 176.149994 176.149994 19712600
2017-10-30 0:00:00 178.429993 181.899994 177.589996 181.580002 181.580002 20219700
2017-10-31 0:00:00 183.570007 185.119995 181.811005 184.889999 184.889999 21256700
2017-11-01 0:00:00 187.880005 188.880005 183.580002 186.080002 186.080002 28594700
2017-11-02 0:00:00 190.990005 191.220001 183.309998 184.809998 184.809998 41239900
2017-11-03 0:00:00 186.509995 186.929993 182.059998 183.210007 183.210007 19697300
2017-11-06 0:00:00 184.070007 188.25 184 187.839996 187.839996 19873100
2017-11-07 0:00:00 189.580002 189.860001 187 188.509995 188.509995 17781000
2017-11-08 0:00:00 187.979996 188.149994 185.100006 185.899994 185.899994 13944600
2017-11-09 0:00:00 184.210007 185.130005 181.050003 185.130005 185.130005 19755600
2017-11-10 0:00:00 187.029999 187.169998 185.399994 186.410004 186.410004 15031000
2017-11-13 0:00:00 186.770004 187.880005 184 184.539993 184.539993 17139100
2017-11-14 0:00:00 184.300003 184.380005 181.149994 181.789993 181.789993 14475300
2017-11-15 0:00:00 179.369995 181.880005 176.735992 181.479996 181.479996 16567000
2017-11-16 0:00:00 183.309998 186.270004 183.119995 185.429993 185.429993 18389500
2017-11-17 0:00:00 185.919998 186.5 184.669998 185.130005 185.130005 13422700
2017-11-20 0:00:00 187.600006 190 186.610992 188 188 25992300
2017-11-21 0:00:00 190.350006 191.559998 188.800003 190.899994 190.899994 19639500
2017-11-22 0:00:00 191.539993 191.75 189.369995 189.839996 189.839996 14417600
2017-11-24 0:00:00 189.389999 191.699997 188.699997 191.190002 191.190002 9887300
2017-11-27 0:00:00 190.490005 191.449997 187.550003 188.029999 188.029999 14952800
2017-11-28 0:00:00 188.830002 189.100006 186.5 186.690002 186.690002 13378100
2017-11-29 0:00:00 185.25 185.410004 173.619995 179.910004 179.910004 40204100
2017-11-30 0:00:00 179.529999 179.800003 176.320007 177.080002 177.080002 25851100
2017-12-01 0:00:00 175.270004 179.800003 173.800003 174.610001 174.610001 26782300
2017-12-04 0:00:00 177.199997 177.580002 168.259995 169.580002 169.580002 35895100
2017-12-05 0:00:00 165.279999 172.960007 164.25 168.960007 168.960007 31609900
2017-12-06 0:00:00 172.630005 173.229996 167.865005 172.630005 172.630005 23897800
2017-12-07 0:00:00 175.289993 175.820007 172.259995 174.470001 174.470001 15697900
2017-12-08 0:00:00 177.570007 178.960007 176.369995 177.619995 177.619995 23543400
2017-12-11 0:00:00 179.899994 180.679993 178.149994 179.289993 179.289993 15626200
2017-12-12 0:00:00 174.639999 178.160004 173.770004 174.639999 174.639999 22656500
2017-12-13 0:00:00 175.190002 177.699997 174.300003 176.470001 176.470001 18653400
2017-12-14 0:00:00 173.110001 173.389999 169.610001 171.75 171.75 32830000
2017-12-15 0:00:00 172.889999 173.550003 170 173.550003 173.550003 41356700
2017-12-18 0:00:00 174.600006 174.699997 172.369995 173.369995 173.369995 17023300
2017-12-19 0:00:00 171.970001 173 170.509995 171.279999 171.279999 23936200
2017-12-20 0:00:00 171.789993 172.899994 170.800003 172.639999 172.639999 17121400
2017-12-21 0:00:00 172.800003 176.25 172.651001 175.320007 175.320007 14812400
2017-12-22 0:00:00 175.839996 176.660004 175.039993 176.289993 176.289993 12524700
2017-12-26 0:00:00 174.550003 175.149994 171.729996 172.330002 172.330002 12913800
2017-12-27 0:00:00 172.289993 173.869995 171.729996 172.970001 172.970001 10152300
2017-12-28 0:00:00 173.039993 173.529999 171.669998 172.300003 172.300003 9508100
2017-12-29 0:00:00 172.279999 173.669998 171.199997 172.429993 172.429993 9704600
数据库作业 用Python读取Excel 数据 存放到mysql中相关推荐
- scrapy爬虫储存到mysql_详解Python之Scrapy爬虫教程NBA球员数据存放到Mysql数据库
获取要爬取的URL 爬虫前期工作 用Pycharm打开项目开始写爬虫文件 字段文件items # Define here the models for your scraped items # # S ...
- python读取excelsheet-一文看懂用Python读取Excel数据
原标题:一文看懂用Python读取Excel数据 导读:现有的Excel分为两种格式:xls(Excel 97-2003)和xlsx(Excel 2007及以上). Python处理Excel文件主要 ...
- 乐视云监控数据存放到influxdb中
3.9 监控.告警系统 监控报警我们分PaaS平台和业务应用两大类. PaaS平台主要聚焦在基础设施和LeEngine的各个服务组件的监控报警(比如主机CPU,内存,IO,磁盘空间,LeEng ...
- python读取串口数据保存到mysql数据库_Python3读取Excel数据存入MySQL的方法
Python是数据分析的强大利器. 利用Python做数据分析,第一步就是学习如何读取日常工作中产生各种excel报表并存入数据中,方便后续数据处理. 这里向大家分享python3如何使用xlrd读取 ...
- python读取excel某一列内容-Python读取Excel数据并根据列名取值
一直想将自己接触到的东西梳理一遍,可就是迈不出第一步,希望从这篇总结开始不要再做行动的矮人了. 最近测试过程中需要用到python读取excel用例数据,于是去了解和学习了下xlrd库,这里只记录使用 ...
- 一文看懂用Python读取Excel数据
导读:现有的Excel分为两种格式:xls(Excel 97-2003)和xlsx(Excel 2007及以上). Python处理Excel文件主要是第三方模块库xlrd.xlwt.pyexcel- ...
- python读取xlsx python读取excel数据
如题 python pandas读取excel数据 如何读取特定sheet的excel数据 1.安装pandas 已经有的可以不用再安装 >pip install pandas 2.读取数据 首 ...
- Python读取excel数据且横轴是日期的图像绘制
Python的matplotlib包含很多图表函数,其中plot()函数是绘制坐标图的. 通常情况下,横轴和纵轴都是数值型数据很好画图,直接带入数据,坐标轴会自动调节大小和显示密度.但是当横轴是日期时 ...
- 用python读取excel数据、并作图_Python读取Excel表格,并同时画折线图和柱状图的方法...
今日给大家分享一个Python读取Excel表格,同时采用表格中的数值画图柱状图和折线图,这里只需要几行代码便可以实. 首先我们需要安装一个Excel操作的库xlrd,这个很简单,在安装Python后 ...
- python读取excel数据使用pyecharts展示
目录 一.场景 二.思路 三.代码 接上一博文读取[excel数据] 一.场景 场景:数据已经从excel读取完毕了,怎么展示呢 二.思路 思路:1.读取excel数据出来之后,那就是怎么去操作数据 ...
最新文章
- java类安卓app 简介_android.app.Activity 的介绍
- mysql分区字段创建索引_MySQL分区字段列有必要再单独建索引吗?
- amchart折线图示例
- 关于修改了virc(增加了:set nu)但是vim行号还是不显示的问题
- android 图片识别白色区域进行裁剪_【研途技能贴】| 4款好用的图片处理软件推荐...
- Q138:PBRT-V3,伪随机数发生器(pseudo-random number generator,RNG)(A.1.2章节)
- 数据时代,嵌入式工程师必须知道的八大加密算法
- torch运行错误libcudnn Unsupported HDF5 version: 1.10.2错误
- 计算机主板电源接口8pin,主板供电篇——CPU辅助电源
- 直线分割平面的公式_折线(含直线)分割平面(图文)解析
- laravel框架的下载与安装
- c语言一个整数犯二的程度编程,2016天梯初赛上篇(部分题目)
- 《犹太人想的和你不一样》
- Python+Vue计算机毕业设计酒店管理系统(前台后台)i2agu(源码+程序+LW+部署)
- 计算机入门 零基础,电脑新手入门指南——零基础一分钟入门电脑硬件
- 华为鸿蒙文案,机智的华为广告文案,各种“吊 打”三星小朋友!
- 《SteamVR2.2.0官方教程(二)》(Yanlz+Unity+XR+VR+AR+MR+SteamVR+Valve+Tutorials+Interaction+Oculus+立钻哥哥++ok++)
- 机器学习-001-SVM线性可分-2020-4-28
- echarts折线图常见配置项 分割线虚线样式 显示y轴符号 设置间隔
- WIN10 + Tensorflow1.12 + Cmake编译 + Bazel编译
热门文章
- 360儿童手表显示服务器错误,360儿童卫士刷机失败怎么办 刷机方法
- iOS耳机红外线遥控器
- 大表哥有个项目,100W预算,让我顺手做了算了......
- 昇腾AI室外移动机器人原理与应用(二 初识室外移动机器人)
- 简单整理HTML 颜色 RGB颜色值
- android system.img userdata.img文件解包打包及设置
- 浅谈“Robots文件信息泄露”
- 2021年最佳Selenium替代品
- #二维差分# [ssloj 1467] U
- 如何删除“我的电脑”、“此电脑”中坚果云图标--三种方法(2020年的可行方案)