1

05 2023 档案

摘要:#### 将字典转为dataframe(1) 使用案例: ``` test_dic = {'subject':[],'time':[],'name':[]} test_dic['subject'].append('play') test_dic['time'].append('2023:10:10' 阅读全文
posted @ 2023-05-29 21:06 Bonne_chance 阅读(82) 评论(0) 推荐(0) 编辑
摘要:#### DataFrame转为数组Array 有文本数据如下: ![](https://img2023.cnblogs.com/blog/2583196/202305/2583196-20230529105336459-1771066108.png) 目标:将文本数据以数组形式呈现 - 步1:读入 阅读全文
posted @ 2023-05-29 11:02 Bonne_chance 阅读(797) 评论(0) 推荐(0) 编辑
摘要:#### 将数据按照区间划分 例如给定数据列表,列表第一个元素为用户编号,第二个元素为用户数值,要将用户按照数值区间对用户和数值进行划分。 用户数据案例如`user_data = [['1',20],['2',12],['3',9],['2',13],['3',4],['1',31],['3',7] 阅读全文
posted @ 2023-05-27 18:46 Bonne_chance 阅读(107) 评论(0) 推荐(0) 编辑
摘要:#### 列表数据写入csv 列表数据案例 - 数据header:test_header = ['num1','num2','num3'] - 数据内容:test_data = [[1,2,3],[3,2,1]] - 写入csv文件 ``` with open(basePath + "test.cs 阅读全文
posted @ 2023-05-27 11:30 Bonne_chance 阅读(133) 评论(0) 推荐(0) 编辑
摘要:#### dataFrame['col_name'].str.contains(str_name,case=False)用法 主要功能:在`dataframe`某一列中找到包含特定字符串的`dataframe` 例如: ![](https://img2023.cnblogs.com/blog/258 阅读全文
posted @ 2023-05-25 18:02 Bonne_chance 阅读(131) 评论(0) 推荐(0) 编辑
摘要:#### 将某目录符合一定要求的文件复制到其他目录 ``` import shutil def copy_files(src_dir, dst_dir): if not os.path.exists(dst_dir): os.makedirs(dst_dir) if os.path.exists(s 阅读全文
posted @ 2023-05-22 17:21 Bonne_chance 阅读(65) 评论(0) 推荐(0) 编辑
摘要:### 使用sciPy计算信号的波峰和波谷 #### 使用`scipy.signal.find_peaks`计算信号的波峰 **使用语法**: ``` scipy.signal.find_peaks(x, height=None, threshold=None, distance=None, pro 阅读全文
posted @ 2023-05-19 15:00 Bonne_chance 阅读(7232) 评论(0) 推荐(2) 编辑
摘要:在信号处理中,有些信号会包含大量的噪声,需要用一些滤波器去噪,本文介绍使用bandpass Butterworth filter进行去噪。 直接使用sciPypython库可以实现噪声滤波 步骤1:导入所需python模块 from scipy.signal import filtfilt from 阅读全文
posted @ 2023-05-18 17:13 Bonne_chance 阅读(868) 评论(0) 推荐(0) 编辑
摘要:### 时间操作 #### 把当前时间转为特定时间字符串 `time_str = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time()))` 结果输出: > `'2023-05-18 09:43:39'` #### 将时间字符串转 阅读全文
posted @ 2023-05-18 09:46 Bonne_chance 阅读(25) 评论(0) 推荐(0) 编辑
摘要:### 对给定目录数据进行新建目录 目标: 1)如图 ![](https://img2023.cnblogs.com/blog/2583196/202305/2583196-20230511175655073-1683448772.png) 2)如图 ![](https://img2023.cnbl 阅读全文
posted @ 2023-05-11 17:59 Bonne_chance 阅读(16) 评论(0) 推荐(0) 编辑
摘要:### 计算给定目录下所有文件的绝对路径 ``` def file_abso_path(dir_path): ''' func: 计算给定父类目录下的所有文件的绝对路径 ''' final_path_list = [] for parent, dirnames, filenames in os.wa 阅读全文
posted @ 2023-05-11 17:33 Bonne_chance 阅读(19) 评论(0) 推荐(0) 编辑
摘要:BeyondCompare使用 BeyondCompare软件说明 BeyondCompare是一款比对文件夹、比对文件的工具。能够识别出两个目录以及两个文件的差异。下载的话自行百度下载安装。 使用-比较目录 比较目录的话,就是把要比较的两个目录输入进去,然后回车即可 使用-比较文件 将两个文件打开 阅读全文
posted @ 2023-05-11 12:07 Bonne_chance 阅读(31) 评论(0) 推荐(0) 编辑
摘要:python对时间戳数据进行可视化 步骤1:加载模块&读取数据 import pandas as pd import os import matplotlib.pyplot as plt import time import datetime plt.rcParams['font.sans-seri 阅读全文
posted @ 2023-05-09 11:18 Bonne_chance 阅读(215) 评论(0) 推荐(0) 编辑
摘要:数字医疗术语 ACC(Acceleration)加速度 AM(Amplitude Modulation)幅值调制 BCG(Ballistocardiogram)心冲击图。是血液循环过程中由于心脏跳动、射血造成的人体对地面的压力变化。 BCM(Body cell mass)体细胞质量 BIA(Bioe 阅读全文
posted @ 2023-05-08 14:03 Bonne_chance 阅读(85) 评论(0) 推荐(0) 编辑

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