- 博客(5)
- 收藏
- 关注
原创 Python 绘图笔记
Python 绘图笔记一、绘制一个简单图代码如下(示例):import matplotlib.pyplot as pltimport numpy as np result = [] # 统计数据 max_iter_num = * # int类型 ... # 循环内 result.append((a,b,c)) ... result = np.array(result) .... # matplo
2021-04-10 16:48:46
447
1
原创 分享一个工具:代码统计工具(SourceCounter)
分享一个工具:代码统计工具代码统计工具:SourceCounter可以手动选择文件类型:
2020-10-24 16:32:58
2949
1
原创 python 写文件(笔记)
一、写文件def write_txt(filepath): with open(filepath, 'w') as wf: wf.write('**********\n') wf.write('=======\n') wf.close() write_txt('data.txt')内容类型(list、dict)注意:将list、dict的内容转为str类型(1)listdef write_txt(filepath): allUsers_
2020-10-23 11:43:14
278
3
原创 python 读文件(笔记)
一、遍历目标文件下.json类型的所有文件名使用glob模块获取定义类型的文件,os模块获取文件名import globimport osurl = path +"/*" + file_typefor file_utl in glob.glob(url): filename = os.path.basename(file_utl) print(filename ) 对获取的文件名做处理方式(1)使用os模块,‘D:\Data\0_556_2279086572.json’ 转为
2020-10-21 15:36:34
453
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人