自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(11)
  • 收藏
  • 关注

原创 python类似列表的str转换为list

以此为例: dataStore = ["CF$43292419760722083X_431126290063872$蒋先辉$431126290063872$宁远县交管大队$2020-12-04$2021-12-03","CF$431121199009193435_431124290049852$杨鹏杰$431124290049852$道县交警大队$2020-12-04$2021-12-03","CF$432926197112084437_431129290035435$陈亮标$4311292900..

2020-12-10 14:55:20 497

原创 13位时间戳转换为时间格式 excel表格读取时间戳转换为时间格式

13位时间戳转换为时间格式import timetimeArray = 1542297599000timeArray = time.localtime(int(str(timeArray)[:10:]))otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)print(otherStyleTime)运行结果:excel表格读取时间戳并转换为时间格式from xlrd import xldate_as...

2020-07-21 17:53:15 1781

原创 python存储json 读取json

存储json文件,逐条按行存储 with open('xxx.json', 'a+', encoding='utf8')as f: json.dump(temp, f, ensure_ascii=False) f.write('\n')读取json文件,逐条按行读取with open('xxx.json', 'r', encoding='ut...

2019-08-02 17:13:23 334

原创 企业信用代码正则筛选

re.findall(r'[1-9A-Z]{1}[1239]{1}[1-9]{1}[0-9]{5}[0-9A-Z]{10}', F_ShehuiXinYongCode)[0] if len(re.findall(r'[1-9A-GY]{1}[1239]{1}[1-9]{1}[0-9]{5}[0-9A-Z]{10}', F_ShehuiXinYongCode)) > 0 else ''...

2019-05-17 15:39:18 884

原创 python json和csv文件存储

存储json文件,逐条按行存储 with open('xxx.json', 'a+', encoding='utf8')as f: json.dump(temp, f, ensure_ascii=False) f.write('\n')存储csv文件 with codecs.open(file_name, 'a+', encoding...

2019-05-16 18:04:07 266

转载 python 取整法(进一取值)

import matha = 3 / 2print(a,type(a))a = math.ceil(a)print(a,type(a))输出结果:

2019-05-16 16:30:16 15761

转载 python 科学计数法

import numpy as npa = '111111111111111111111111111111111111111'np.set_printoptions(suppress=True)x = np.array(a)b = float(a)print(a)print(x,type(x))print(b,type(b))输出结果:

2019-05-16 16:10:53 19402

原创 python创建文件夹,有则pass,无则创建

file_name = '文件路径/文件名称"print(file_name)download_path = os.path.split(file_name)[0]if os.path.isdir(download_path): passelse: os.mkdir(download_path)

2019-05-16 10:42:18 516

原创 无头浏览器

options = webdriver.ChromeOptions()options.set_headless()driver = webdriver.Chrome(chrome_options=options)

2018-12-13 16:35:59 742

原创 requests请求时data需要指定是字符串类型

正常请求不返回数据,给data指定成Str后就可以了!!!

2018-06-22 16:21:16 1137

原创 Python 定位div 下拉框 Python遍历div且选中想要的值点击跳出

飞猪机票选中地址操作!!!  小白欢迎指正

2018-06-22 16:12:35 3776

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除