python基础
python基础
森林森
java学习
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python切换数据源
# 国内源: # 清华:https://pypi.tuna.tsinghua.edu.cn/simple # # 阿里云:http://mirrors.aliyun.com/pypi/simple/ # # 中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ # # 华中理工大学:http://pypi.hustunique.com/ # # 山东理工大学:http://pypi.sdutlinux.org/ # # 豆瓣:http://pypi.douban.c原创 2020-09-04 15:49:20 · 653 阅读 · 0 评论 -
xlsxwriter+peewee写入Excel
表结构 CREATE TABLE `order_info` ( `order_id` bigint(20) NOT NULL COMMENT '订单id', `order_no` varchar(50) NOT NULL COMMENT '订单编号', `check_code` varchar(10) NOT NULL DEFAULT '' COMMENT '订单取货码,店铺7天内唯一...原创 2019-12-03 17:42:28 · 457 阅读 · 0 评论 -
python-peewee读取数据
使用 # !/usr/bin/python # -*-coding:utf-8-*- # @Author: 刘楠 # @Time: 2019/12/3 9:05 # @File : order.py import peewee from peewee import * from datetime import * from decimal import * db = MySQLDatab...原创 2019-12-03 17:41:06 · 991 阅读 · 0 评论 -
用xlrd包读取Excel文件-尽量不用xlwt包写入Excel文件最多能支持65536行数据。
1. 引有包 import xlrd 打开文件 data = good_ivy = xlrd.open_workbook(r'商品库存.xls') 获取你要打开的sheet文件 # table = data.sheets()[0] # print(table.nrows) # 获取所有sheet sheet_name = data.sheet_names()[0] # 根据sheet索引或...原创 2019-12-03 17:40:13 · 2199 阅读 · 0 评论 -
python-mysql-like语句
字符串使用%需要转义 goods_info_sql="SELECT goods_info_id, goods_name,goods_code,goods_barcode from goods_info where goods_name like '%%%s%%'"%("听") Python在执行sql语句的时候,同样也会有%格式化的问题,仍然需要使用%%来代替%。因此要保证在执行sql语句的时候...原创 2019-12-03 17:39:19 · 762 阅读 · 0 评论 -
python-mysql1
安装pymysql pip install pymysql import pymysql # 打开数据库连接 db = pymysql.connect(“localhost”,“root”,“root”,“cis_prod” ) print(‘db %s’%db) # 使用 cursor() 方法创建一个游标对象 cursor cursor = db.cursor() goods_inf...原创 2019-12-03 17:38:47 · 170 阅读 · 0 评论 -
Pycharm 安装 autopep8
Pycharm 安装 autopep8 打开电脑cmd,输入 pip install autopep8 回车 ok 坐等下载安装完成即可 将autopep8配置到Pycharm中 打开Pycharm→File→settings→Tools→Extends Tools→添加 a:Name:Autopep8(可以随便取) 下面的重要配置 b: Tools settings下面的 Pro...原创 2019-12-03 17:35:58 · 357 阅读 · 0 评论
分享