自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 省份简称匹配并分组统计

省份简称匹配并分组统计import pandas as pdfrom sqlalchemy import create_engineconn = create_engine( 'mysql+pymysql://root:password@localhost:3306/related_data?charset=utf8mb4')sql = 'SELECT * FROM production_permited'df = pd.read_sql(sql=sql, con=conn)provi

2021-07-30 12:00:36 216

原创 python合并excel

python合并excelimport pandas as pdfrom sqlalchemy import create_engineimport osfolder_path = r'D:\相关路径'conn = create_engine( 'mysql+pymysql://root:password@localhost:3306/cooperation?charset=utf8mb4')file_paths = []for root, dirs, files in os.walk

2021-07-30 11:46:10 64

原创 pandas分割excel

pandas分割excelimport pandas as pdimport mathpath = r'C:\Users\lenovo\Desktop\目标数据.xlsx'df = pd.read_excel(path)tem = 0# ceil向上取整for i in range(math.ceil(175127/10000)): name = str(i) + '.xlsx' df[tem:tem+10000].to_excel(name,index=False)

2021-07-30 11:36:16 127

原创 python线程池样例

python线程池样例from concurrent.futures import ThreadPoolExecutorimport timedef printperson(p): print(p) time.sleep(2)person = ['anna','grey','all']start = time.time()# 抢占式线程池with ThreadPoolExecutor(3) as executor: for p in person:

2021-07-30 11:32:34 97

原创 openpyxl将一个Excel按照指定样式追加到目标表

import pandas as pdfrom openpyxl.styles import Alignmentimport openpyxlfrom openpyxl.utils.dataframe import dataframe_to_rowsclass Write_Excel(object): def __init__(self): self.input_path = r'C:\Users\lenovo\Desktop\excel\a.xlsx'

2021-07-30 09:54:16 184

空空如也

空空如也

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

TA关注的人

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