logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

已解决 Building wheel for flash-attn (setup.py) ... error error: subprocess-exited-with-error ×

Building wheel for flash-attn (setup.py) ... errorerror: subprocess-exited-with-error× python setup.py bdist_wheel did not run successfully.│ exit code: 1╰─> [9 lines of output]fatal: not a git reposi

文章图片
字典和dataFrame的相互转换

pandas中经常用的是 DataFrame.to_dict() 函数将dataFrame转化为字典类型(字典的查询速度很快)函数DataFrame.to_dict(orient=‘dict’, into=)dataFrame.to_dict() 结果默认 index 是 key ,其他字段是和 index 对应的 value结果:3、 orient =‘list’orient =‘list’ ,

#python#数据挖掘#pandas +1
解决问题TypeError: issubclass() arg 1 must be a class

这是由python中的后端包之一的兼容性问题引起的问题,包“pydantic”执行下面命令可以解决。

#python#机器学习
(八)特征选择与特征提取

特征选择与特征提取一、特征的选择1、原始特征在描述对象的时候模式识别中把每个对象都量化为一组特征来描述,构建特征空间是解决模式识别问题的第一步,其中通过直接测量得到的特征称为原始特征。如: - 人体的各种生理指标(以描述健康状况) - 数字图像中的每点的灰度值(以描述图像内容)原始特征的形成一般包含三大类:物理、结构和数学特征物理和结构特征:易于为人的直觉感知,但是有时难以定量描述,因此不利于机器

#计算机视觉#机器学习
pandas中 map,apply的用法和进度条设置

在pandas中一般有两种数据结构对象Series、DataFrame。想要批量精心化操作Series、DataFrame就需要使用配套方法:map、apply和applymap构造实验数据集参数:arg : function, dict, or Seriesna_action : 取值为 {None, ‘ignore’}, 默认为 None返回值:Pandas Series with same

#python#数据挖掘#数据分析 +1
pandas常用操作

pandas常用操作1、修改表头import pandas as pddf = pd.DataFrame({'a':[1,2,3],'b':[1,2,3]})ab0111222331、修改列名a,b为A、B。df.columns = ['A','B']2、只修改列名a为Adf.rename(columns={'a':'A'})

#python#数据分析
pandas 保存csv 不要序号

pandas 保存csv 不要序号在用pandas输出csv时,如果不对第一行和第一列进行定义,pandas会自动用数字序号补齐,但有时候我们只想单纯输出数据,不想要表头或者序号,那么就需要以下的操作:output = pd.DataFrame(data=list1)output.to_csv('save_path', header=None, index=None)将header和index赋值

#机器学习#数据挖掘#python
jupyter 中直接安装相应的包

pip 可以在所有环境下安装python包。conda 可以在conda环境下安装所有包。如果你已经安装了python,那么这个选择对你来说是非常容易的如果你是用Anaconda或者Miniconda安装的python,那么请使用conda命令来安装python包。如果conda告诉你你要下载的这个包不存在,那么使用pip(或者试试 conda-forge, 它比conda默认的包的数量要更多)。

#jupyter#python#ide
字典和dataFrame的相互转换

pandas中经常用的是 DataFrame.to_dict() 函数将dataFrame转化为字典类型(字典的查询速度很快)函数DataFrame.to_dict(orient=‘dict’, into=)dataFrame.to_dict() 结果默认 index 是 key ,其他字段是和 index 对应的 value结果:3、 orient =‘list’orient =‘list’ ,

#python#数据挖掘#数据分析
python中的re模块

python中的re模块Python中re模块主要功能是通过正则表达式是用来匹配处理字符串的第一步:import re导入该模块后,就可以使用该模块下的所有方法和属性import rere有很多的方法和属性re 模块提供了不少有用的函数,用以匹配字符串,比如:compile 函数match 函数search 函数findall 函数finditer 函数split 函数sub 函数subn 函数r

#python#正则表达式
暂无文章信息