上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: Python控制exce 关于包的说明: xlrd 读取excel文件, xlrd >= 2.0时,仅支持xls格式; 指定 xlrd 版本 1.2.0 可支持xlsx xlwt 写入excel文件,仅支持xls格式。推荐使用 适合与xlrd配合读取和修改excel文件,也可以直接创建新excel文 阅读全文
posted @ 2020-08-11 08:24 疯狂列表推导式 阅读(4367) 评论(0) 推荐(0) 编辑
摘要: # -*- coding: utf-8 -*- list1 = [1, 2, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5] list2 = [5, 5, 6, 7, 8, 9] # set集合 # 差集--两种情况 print(list(set(list1) - set(list2)) 阅读全文
posted @ 2020-06-29 08:38 疯狂列表推导式 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 1. apt get install 适用于Ubuntu系统,不适用于mac os 2. mac os安装包的命令应该是brew 阅读全文
posted @ 2020-05-10 08:54 疯狂列表推导式 阅读(660) 评论(0) 推荐(0) 编辑
摘要: import os from multiprocessing import Pool demo = 'this is a test' def func(): with open('text.txt', 'w') as f: f.write(demo) print('process {} write 阅读全文
posted @ 2020-04-19 23:57 疯狂列表推导式 阅读(112) 评论(0) 推荐(0) 编辑
摘要: ```https://blog.csdn.net/cpongo3/article/details/88819885``` 阅读全文
posted @ 2020-04-19 19:18 疯狂列表推导式 阅读(127) 评论(0) 推荐(0) 编辑
摘要: ``` # -*- coding: utf-8 -*- ''' @File : test.py @Author: qiguagnhui @Date : 2020-04-11 23:17 @Desc : ''' import os import sys savedStdout = sys.stdout #保存标准输出流 with open('out.txt', 'w') as file: sys.s 阅读全文
posted @ 2020-04-16 23:52 疯狂列表推导式 阅读(135) 评论(0) 推荐(0) 编辑
摘要: # -*- encoding=utf-8 -*- from itertools import combinations,permutations test_data = {'a', 'b', 'c'} # 排列 -- 关注排列方式 print('排列有:{}'.format(list(permuta 阅读全文
posted @ 2020-04-13 08:20 疯狂列表推导式 阅读(270) 评论(0) 推荐(0) 编辑
摘要: ``` # 第一种: number = 11223344556677889900 # 反转1,reverse()方法 # list1 = list(str(number)) # list1.reverse() # 反转2, 切片 list1 = list(str(number))[::-1] print('反转后的', list1) # 删除 # 删除1, 直接remove元素 list1.rem 阅读全文
posted @ 2020-04-13 08:12 疯狂列表推导式 阅读(275) 评论(0) 推荐(0) 编辑
摘要: ``` # -*- coding: utf-8 -*- import cv2 # 读取图片 img = cv2.imread('phone.png') # h、w为想要截取的图片大小 h = 35 w = 170 x = 500 y = 425 cropImg = img[(y):(y + h), (x):(x + w)] cv2.imwrite('test.png', cropImg) ``` 阅读全文
posted @ 2020-04-13 06:52 疯狂列表推导式 阅读(106) 评论(0) 推荐(0) 编辑
摘要: ``` # -*- coding: utf-8 -*- # 获取server运行情况 # import json # from datetime import datetime # # import paramiko # import xlwt, xlrd # from xlutils.copy import copy # # def get_host_cpu_memory(): # client 阅读全文
posted @ 2020-04-12 18:27 疯狂列表推导式 阅读(248) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页