python-强制类型转换astype()
摘要:使用df.astype()强制类型转换,df['col']=df['col'].astype('float') 实际踩坑: 如果报错:TypeError: unsupported operand type(s) for +: 'int' and 'str' 解决:将第二个转成str,用astype(
阅读全文
posted @
2020-11-10 18:59
dLarger
阅读(3496)
推荐(0)
dataframe,series,numpy array 创建及相互转换!!!!!!
摘要:#1.dataframe转成numpy array 把Pandas中的dataframe转成numpy中的array df=df.values #2.series和dataframe转换 import pandas as pd //y_pred是ndarray //将ndarray转为series
阅读全文
posted @
2020-11-10 18:51
dLarger
阅读(5527)
推荐(1)
pip使用清华源安装软件
摘要:#1.临时使用 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package 如:安装cv2—— pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-
阅读全文
posted @
2020-11-10 18:39
dLarger
阅读(595)
推荐(0)
VSCode 运行python,未安装,提示“No module named XXX”
摘要:#numpy解决方法 pip install --default-timeout=1000 numpy 如果用:pip install numpy,很容易出现超时! 参考:https://blog.csdn.net/qq_40279192/article/details/106745876 下载过程
阅读全文
posted @
2020-11-06 06:38
dLarger
阅读(1851)
推荐(0)
python3.7及vscode环境安装及配置
摘要:#1.python3.7安装 安装包版本路径:https://www.python.org/downloads/release/python-378/ 安装参数说明: 1.如果要自定义目录:选择“典型安装”,可以指定安装目录。 2.“典型安装”中参数说明: 2.1 python test suit-
阅读全文
posted @
2020-11-05 22:35
dLarger
阅读(1268)
推荐(0)
完全卸载vs2019.
摘要:#方式1:vs2019自带的卸载功能 #方式2:如果卸载不掉,使用第三方卸载工具 TotalUninstaller https://github.com/Microsoft/VisualStudioUninstaller/releases 参考:https://www.zhihu.com/quest
阅读全文
posted @
2020-11-05 17:18
dLarger
阅读(3356)
推荐(0)
tar命令
摘要:#打包,解包命令 命令 作用 tar -cvf 打包文件.tar 被打包的一系列文件,打包文件 tar -xvf 打包文件.tar 解包文件(默认解包到当前目录下) tar -xvf 打包文件.tar -C 目录 将文件解包到指定目录。 "tar"选项说明: "-c"选项:英文"create"缩写,
阅读全文
posted @
2020-11-02 14:36
dLarger
阅读(675)
推荐(0)