随笔分类 -  python

python编程及使用。
摘要:安装数据库需要的包 pip install redis pip install psycopg2 sqlite3内置 pip install pymongo pip install pymssql pip install PyMySQL pip install cx_Oracle 1.连接sqlit 阅读全文
posted @ 2023-02-02 09:59 星空沃土 阅读(662) 评论(0) 推荐(0)
摘要:1 # coding:<encoding name> : # coding: utf-8 2 import xlrd2 3 from docxtpl import DocxTemplate 4 5 6 def main(): 7 data = xlrd2.open_workbook(r"data.x 阅读全文
posted @ 2023-02-02 09:35 星空沃土 阅读(349) 评论(0) 推荐(0)
摘要:1、基本类型 integer,float,boolean,string bytes 2、识别码 变量、函数,模块、类。。。的命名。 3、变量赋值 = 4、容器类型 list[],tuple() str"",dict{} set,set() 5、类型转换 int,float,round,bool,st 阅读全文
posted @ 2023-02-02 09:17 星空沃土 阅读(94) 评论(0) 推荐(0)
摘要:python对sqlite数据库的操作如下: 需要注意以下三点: 对数据做更改必须得使用conn.commit()语句变更才生效。 为了使语句安全,使用这样的格式,传变量。symbol = 'RHAT' c.execute("SELECT * FROM stocks WHERE symbol = ' 阅读全文
posted @ 2020-08-20 16:24 星空沃土 阅读(517) 评论(0) 推荐(0)