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