随笔分类 -  python

摘要:1.socket_service import socket import threading import struct import os def socket_service(ipv4,port,stat): #ipv4为IP地址,port为端口,stat可选择"send"或"recive"( 阅读全文
posted @ 2023-06-29 13:49 kuanleung 阅读(141) 评论(0) 推荐(0) 编辑
摘要:gam的应用详细介绍 https://blog.csdn.net/qq_35591253/article/details/130938485 阅读全文
posted @ 2023-06-09 11:22 kuanleung 阅读(4) 评论(0) 推荐(0) 编辑
摘要:#导入必要的库 import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor #读取数据 data = data_all1 #找出所有缺失值所在的行和列 nan_rows,nan_c 阅读全文
posted @ 2023-06-07 19:24 kuanleung 阅读(25) 评论(0) 推荐(0) 编辑
摘要:并列柱形图的绘制 import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') plt.rcParams['font.sans-serif']=['SimHei'] plt.rcParams['font.sans-serif'] 阅读全文
posted @ 2022-10-20 19:23 kuanleung 阅读(12) 评论(0) 推荐(0) 编辑
摘要:绘制并列图的代码 import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') plt.rcParams['font.sans-serif']=['SimHei'] plt.rcParams['axes.unicode_minu 阅读全文
posted @ 2022-10-20 16:31 kuanleung 阅读(7) 评论(0) 推荐(0) 编辑
摘要:err_inter = result.conf_int() #置信区间的中心 err_mean = (err_inter[1]+err_inter[0])/2 # 置信区间的长度 err_long = (err_inter[1]-err_inter[0])/2 #置信区间画图 import matp 阅读全文
posted @ 2022-07-03 09:25 kuanleung 阅读(25) 评论(0) 推荐(0) 编辑
摘要:import matplotlib.pyplot as plt plt.style.use('seaborn-whitegrid') plt.rcParams['font.sans-serif']=['SimHei'] plt.rcParams['axes.unicode_minus'] = Fal 阅读全文
posted @ 2022-07-03 09:23 kuanleung 阅读(18) 评论(0) 推荐(0) 编辑
摘要:import pandas as pd import os import openpyxl path = './2006城市年鉴.xlsx' excel = openpyxl.load_workbook(path) length = len(excel.sheetnames) book_1 = pd 阅读全文
posted @ 2022-05-02 10:04 kuanleung 阅读(4) 评论(0) 推荐(0) 编辑
摘要:import os import pandas as pd import re path = './编码文件' files = os.listdir(path) code = pd.read_excel('./文件名与编码文件/编码和名称.xlsx',sheet_name=0) code 2009年 阅读全文
posted @ 2022-04-05 21:27 kuanleung 阅读(7) 评论(0) 推荐(0) 编辑
摘要:import os import pandas as pd import re path = './编码文件' files = os.listdir(path) code = pd.read_excel('./文件名与编码文件/编码和名称.xlsx',sheet_name=0) code for f 阅读全文
posted @ 2022-04-05 14:36 kuanleung 阅读(8) 评论(0) 推荐(0) 编辑
摘要:来源https://www.cnblogs.com/tianqizhi/p/10612976.html 1.背景主题、字体大小设置 安装Jupyter主题: pip install jupyterthemes -i https://mirrors.aliyun.com/pypi/simple 然后, 阅读全文
posted @ 2022-03-29 19:41 kuanleung 阅读(21) 评论(0) 推荐(0) 编辑
摘要:动图折线展示: import numpy as np import matplotlib.pyplot as plt plt.ion() plt.figure(1) t_list = [] result_list = [] t = 0 while True: if t >= 10 * np.pi: 阅读全文
posted @ 2022-03-20 20:53 kuanleung 阅读(6) 评论(0) 推荐(0) 编辑
摘要:import matplotlib.pyplot as plt import numpy as np import pandas as pd plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签 plt.rcParams['axes.unico 阅读全文
posted @ 2022-01-28 19:50 kuanleung 阅读(4) 评论(0) 推荐(0) 编辑
摘要:不能用 import zipfile from tqdm import tqdm import itertools as it def extractFile(zipFile, password): try: zipFile.extractall(pwd= bytes(password, "utf8 阅读全文
posted @ 2021-08-18 21:23 kuanleung 阅读(4) 评论(0) 推荐(0) 编辑
摘要:dir = os.listdir('C:\\Users\Admin\Documents\\vscode\PDF\\中国渔业统计年鉴') for i in dir: pdir=os.listdir('C:\\Users\Admin\Documents\\vscode\PDF\\中国渔业统计年鉴\\{0 阅读全文
posted @ 2021-07-24 20:34 kuanleung 阅读(7) 评论(0) 推荐(0) 编辑
摘要:# pip install pdf2docx #安装依赖库 from pdf2docx import Converter pdf_file = r'C:\Users\Administrator\Desktop\新建文件夹\mednine.pdf' docx_file = r'C:\Users\Adm 阅读全文
posted @ 2021-05-13 19:28 kuanleung 阅读(4) 评论(0) 推荐(0) 编辑
摘要:import pandas as pd import numpy as np pd.options.display.max_columns = None p_df = pd.read_excel('产量.xlsx') p_ratio = pd.read_excel('养殖配比.xls') xunib 阅读全文
posted @ 2021-02-21 16:00 kuanleung 阅读(3) 评论(0) 推荐(0) 编辑
摘要:import pandas as pd pd.options.display.max_columns = None data = pd.read_csv(r'总.csv',encoding='utf-8') # DM_MCI DM_MCI = data.iloc[0:22,:].describe() 阅读全文
posted @ 2021-02-20 21:23 kuanleung 阅读(18) 评论(0) 推荐(0) 编辑
摘要:pandas的基础操作进行数值计算 import pandas as pd import numpy as np pd.options.display.max_columns = None p_df = pd.read_excel('产量.xlsx') p_ratio = pd.read_excel 阅读全文
posted @ 2021-02-20 15:50 kuanleung 阅读(6) 评论(0) 推荐(0) 编辑
摘要:入门资源 https://www.bilibili.com/video/BV1RK4y1H7he/ 阅读全文
posted @ 2021-01-30 09:03 kuanleung 阅读(4) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示