随笔分类 - python
摘要:#模型保存pmml from sklearn2pmml import sklearn2pmml,PMMLPipeline pipeline = PMMLPipeline([('classifier',xgb_model)]) pipeline.fit(train_xgb.drop('target',
阅读全文
摘要:#获取周一,周二..... lexin_df['weekday'] = lexin_df['approve_date'].map(lambda x:x.weekday()+1) #获取小时 lexin_df['hour'] = lexin_df['approve_date'].map(lambda
阅读全文
摘要:from Cryptodome.Cipher import AES from Cryptodome import Random from binascii import b2a_hex ,a2b_hex def aes_encrypt(data,key=''): # 要加密的明文 #data = '
阅读全文
摘要:import matplotlib as mpl mpl.rcParams['font.sans-serif'] = ['simhei'] mpl.rcParams['font.serif'] = ['simhei']
阅读全文
摘要:# 连接mysql import pymysql import pandas as pd conn = pymysql.connect( host='10.0.*.*' , # 要连接的主机地址 user='test', # 用于登录的数据库用户 password='123456', # 密码 da
阅读全文
摘要:用ImageGrab.grabclipboard()获取的图片时出现错误AttributeError: 'NoneType' object has no attribute 'save';获取不到图片 解决:在img= ImageGrab.grabclipboard()前面加 time.sleep(
阅读全文

浙公网安备 33010602011771号