python ¿Ä¸ê¿Ä¨é·JÁ` (¥þ³¡)"¸ê®Æ
- ©«¤l
- 55
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 10
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2016-5-15
- ³Ì«áµn¿ý
- 2018-11-1
|
¦^´_ lpk187
¨S¿ù¡I ¶·¥[¤W [ ... ] ¤~¦æ¡C
¦p¦¹ pandas ªº¶×¤J¤]¸Ñ¨M¤F¡C
ÁÂÁÂÅo¡I
c_c_lai µoªí©ó 2016-9-30 12:34
c¤j
¥i§_½Ð±Ð¤@¤U¡A¦bpython¨ú¥X¸ê®Æsql ¬On¦b pythonª½±µµe¹Ï¹À¡H³t«×¸û§Ö¡HÁÙ¬O³æ¯Â½m²ß©O¡H
¦]¬°¬Ý¹Lªdªº¤å³¹¬O¥Îvbaµe
ps:¥Ø«e¤p§Ìªº·Qªk¬O python§ì¨ú¸ê®Æ¦Üsqlite3¡Avba±qsqlite3¨ú¥X¸ê®Æ
³æ¯Â¥æ¬y¤@¤U·Qªk |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 44# lpk187
³o³¡¤À§Ú¦A¸Õ¸Õ¬Ý¡AÁÂÁ¶O¤ß¡I |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 45# lpk187
¨S¿ù¡I ¶·¥[¤W [ ... ] ¤~¦æ¡C
¦p¦¹ pandas ªº¶×¤J¤]¸Ñ¨M¤F¡C
ÁÂÁÂÅo¡I
|
|
|
|
|
|
|
- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ lpk187 ©ó 2016-9-30 10:03 ½s¿è
¦^´_ 35# c_c_lai
¦bsqlite3¤¤ ¥Î sql»yªk¡A¦³¨Ç³\¤£¦P¡A´N¬O¸ê®Æªín¥Î [ ] ¤¤¬A¸¹- import sqlite3 as lit
- import pandas as pd
- conn = sqlite3.connect('twsedata.sqlite')
- data=pd.read_sql('select * from [0050]',conn)
- conn.close()
- data
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¦^´_ 43# c_c_lai
¦bì¨Óµ{§Ç¤¤¡A«Ø¥ß¸ê®Æªí®É¡A´N³£¦³«Ø¥ß¥DÁä (Primary Key)¡A©Ò¥H¬O¤£·|¦³«½ÆȪº¡A
sql = "CREATE TABLE ªÑ²¼(ªÑ²¼¥N¸¹ char(10) PRIMARY KEY,....
sql="CREATE TABLE [" + i + "](¤é´Á DATETIME PRIMARY KEY, \
Y¦³¥²n«Ø¥ß¥~¨ÓÁä(Secondary Key)¡A¥i¥H§ï¦¨
sql="CREATE TABLE [" + i + "] (¤é´Á DATETIME PRIMARY KEY REFERENCES [0050] (¤é´Á), \
¥t¥~SQLite3´N¦³«Ø¥ß¯Á¤Þ
|
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2016-9-30 07:43 ½s¿è
¦^´_ 42# lpk187
¤£¦n·N«ä¡A§Ú¬O»¡µ{¦¡¤¤¦p¦ó¥h«Ø¥ß¯Á¤ÞÀÉ (Primary Key, Secondary Key µ¥)¡A
¦b¤U¤@¦¸°õ¦æ®É¡A«K¯à§PÂ_¬O§_¬°«½Æ (Duplicate) Key È¡A¦Ó¥h°õ¦æ Update °Ê§@¡A
¤Ï¤§°õ¦æ Insert ªº °Ê§@¡C¦p¦¹«K¯à¥¿±`¦a¥hºûÅ@»P¤F¸Ñ¸ê®Æ®wªº¹B¥Î¤F¡C
Python ¥¿ÁÙ¦b¾Ç²ß¤¤¡A½Ñ¦h´£°ÝÁٽЦh¦h«ü±Ð¡I |
|
|
|
|
|
|
- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¦^´_ 40# c_c_lai
¤£¦n·N«ä¡A¤£¬O«Ü©ú¥Õ§Aªº·N«ä¬O¤°»ò¡H¥i¥HÁ|¦C»¡©ú¶Ü¡H¦]¬°§Ú¨S¦b¾Þ§@³]²¼¡A©Ò¥H¹ï³o¡A¤£©ú¥Õ |
|
|
|
|
|
|
- ©«¤l
- 55
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 10
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2016-5-15
- ³Ì«áµn¿ý
- 2018-11-1
|
¥»©«³Ì«á¥Ñ koshi0413 ©ó 2016-9-29 19:31 ½s¿è
¦^´_ 40# c_c_lai
¹ï«¨ ªdªº¥DÁä©O??????????????
©Ç¤F¡A¤p§Ì¤]¨S³o±¡ªp¤]@@
¤£¹L³q±`¤p§Ì¥u«Ø¥ß¯Á¤Þ ¨S«Ø¥ß¥DÁä ³o¤è±¥i¥H½Ð±Ð j¤j
µ¥µ¥¡Aè¤~¬Ý¤F¤@¤U¦Û¤vªº¡A ¤]¤@¼Ë¡Ac¤j ª½±µ¥hÂI¦UªÑªí®æ¬Ý¬Ý |
-
-
32213.jpg
(53.27 KB)
-
-
32213.jpg
(65.62 KB)
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¦^´_ 38# lpk187
|
|
|
|
|
|
|
- ©«¤l
- 55
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 81
- ÂI¦W
- 0
- §@·~¨t²Î
- win
- ³nÅ骩¥»
- 10
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2016-5-15
- ³Ì«áµn¿ý
- 2018-11-1
|
¦^´_ 37# c_c_lai
c¤j¬O¤£¬O¤â°Ê§â¸ê®Æ°O¿ý²M°£¹L¡A³Ì«e±¨º¦æ¤£¥i°fªº¡A¹³ l¤j»¡ªº ¤£¼vÅT¬d¸ß |
|
|
|
|
|
|