摘要: #模型保存pmml from sklearn2pmml import sklearn2pmml,PMMLPipeline pipeline = PMMLPipeline([('classifier',xgb_model)]) pipeline.fit(train_xgb.drop('target', 阅读全文
posted @ 2022-03-31 10:36 地豆苗 阅读(1278) 评论(0) 推荐(0)
摘要: #获取周一,周二..... lexin_df['weekday'] = lexin_df['approve_date'].map(lambda x:x.weekday()+1) #获取小时 lexin_df['hour'] = lexin_df['approve_date'].map(lambda 阅读全文
posted @ 2022-03-25 11:42 地豆苗 阅读(782) 评论(0) 推荐(0)
摘要: from Cryptodome.Cipher import AES from Cryptodome import Random from binascii import b2a_hex ,a2b_hex def aes_encrypt(data,key=''): # 要加密的明文 #data = ' 阅读全文
posted @ 2022-02-23 10:06 地豆苗 阅读(316) 评论(0) 推荐(0)
摘要: import matplotlib as mpl mpl.rcParams['font.sans-serif'] = ['simhei'] mpl.rcParams['font.serif'] = ['simhei'] 阅读全文
posted @ 2022-02-23 10:04 地豆苗 阅读(145) 评论(0) 推荐(0)
摘要: # 连接mysql import pymysql import pandas as pd conn = pymysql.connect( host='10.0.*.*' , # 要连接的主机地址 user='test', # 用于登录的数据库用户 password='123456', # 密码 da 阅读全文
posted @ 2022-02-23 09:58 地豆苗 阅读(281) 评论(0) 推荐(0)
摘要: 用ImageGrab.grabclipboard()获取的图片时出现错误AttributeError: 'NoneType' object has no attribute 'save';获取不到图片 解决:在img= ImageGrab.grabclipboard()前面加 time.sleep( 阅读全文
posted @ 2022-02-16 17:24 地豆苗 阅读(1021) 评论(0) 推荐(0)