自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

特浓悠哈的博客

菜菜菜菜

  • 博客(12)
  • 收藏
  • 关注

原创 记录python mongo使用

mongo_client = pymongo.MongoClient(MONGOINFO)collection= mongo_client[“database”][“collection”]列出数据库中的所有集合mongo_client[“database”].list_collection_names()集合插入数据collection.insert_one({ })清空集合collection.remove()删除集合collection.drop()统计集合数据colle

2022-04-28 15:10:11 1364

原创 python3 UnicodeEncodeError: ‘gbk‘ codec can‘t encode character ‘\xXX‘ in position XX

想将字典写入json中遇到了标题的问题,在with中加上encoding=‘utf8’ 解决了tmp = {"version": "0.1.0", "data": [train]}with open('data.json',"w",encoding='utf8') as f: json.dump(tmp,f,ensure_ascii=False)另外在dump中加上 ensure_ascii=False 可以解决保存中文数据时出现unicode...

2022-03-08 09:58:14 148

原创 Could not find module ‘...gfortran-win_amd64.dll‘

导入from sklearn.metrics.pairwise import cosine_similarity遇到的问题Could not find module ‘…gfortran-win_amd64.dll‘解决方法:修改scipy版本添加环境变量

2022-03-08 01:14:51 1899 1

原创 OSError: Error no file named pytorch_model.bin found in directory facebook/bart-large-cnn but there

下载facehugging里面的模型一直报这个错误:model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn") OSError: Error no file named pytorch_model.bin found in directory facebook/bart-large-cnn but there is a file for Flax weights. Use `from_flax=True` to lo

2022-03-05 23:31:58 4605

原创 mongodb-org:Cannot download repodata/repomd.xml: All mirrors were tried

yum install -y mongodb-org要安装mongodb时报错Error: Failed to download metadata for repo ‘mongodb-org-3.4’: Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried解决方法参考ls /etc/yum.repos.d/查看是否有mongodb-org.repo,有就删除...

2021-10-13 16:49:56 7530 4

原创 阿里云云服务器部署Elasticsearch和Kibana过程

版本信息:阿里云ESC LinuxES版本7.10.1Kibana版本7.10.1部署Elasticsearch主要跟着参考链接做的,然后需要注意的是,部署完之后在自己主机中一直登不上服务器的9200端口,查找资料后才发现需要自己设置安全组才可以登录。操作步骤:1.2.3.4.部署Kibana主要借鉴参考链接部署过程与Elasticsearch差不太多,之前都踩过一遍坑就顺利很多了。注意点:在运行Elasticsearch、Kibana时需要确认一下是否现在的用户不是root

2021-10-10 20:17:47 847

原创 error: src refspec master does not match any.

好久没用github了,找了篇新手教程重新学,然后出了一堆error教程到 git push -u origin master步骤出错常见原因:1.本地git仓库目录下为空2.本地仓库add后未commit3.git init错误解决方法这些试了对我都没用,然后猜想可能是分支名写错了,用git branch 查看一下,发现显示的是main应该输入的是git push -u origin main...

2021-06-06 21:09:35 83

原创 修改DataFrame最后一行的数据却一直新增一行

原表格df.at[-1,'Close'] = data[-2]#ordf.loc[-1,'Close'] = data[-2]结果都变成新增了一行

2021-05-04 22:02:56 571

原创 ERROR: torch-1.4.0+cpu-cp38-cp38m-win_amd64.whl is not a supported wheel on this platform.

输入老师给的下载pytorch和torchvision的命令报错找不到版本pip install torch==1.4.0 torchvision==0.5.0 -i https://pypi.douban.com/simple报错:could not find a version that satisfies the requirement torch然后找教程去它的whl下载的网址下载,我直接下载放到D盘whl下载的网址下载后打开命令行进入对应下载地址(D:)输入下方命令pip

2020-10-30 21:37:07 17903 11

原创 DataFrame按多个条件删除行

data.drop(index=(data[(data["公司缩写"]==row[1])&(data["发布时间"]==row[2])&(data["文章综合情感"]==row[3])].index))for row in merge_data12.itertuples(): #循环titleData每一行 a = row[1].split(",") #print(merge_data12[(merge_data12["公司缩写"]==row[1])&(merg

2020-06-20 15:27:35 4695

原创 将DataFrameGroupBy转回DataFrame

遇到这个问题,看到很多文章都说在后面加上reset_index()函数就好了,但我代码运行后出现forumData2 = forumData.groupby(forumData['公司缩写']).reset_index()AttributeError: Cannot access callable attribute ‘reset_index’ of ‘DataFrameGroupBy’ objects, try using the ‘apply’ method这就有点搞笑了,发现那些文章在gro

2020-06-18 23:53:35 5437

原创 在命令行下载了模块 而在jupyter中无法导入的问题

借鉴了https://blog.csdn.net/qq_34650787/article/details/83304080?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1分别在jupyter和命令行中的python输入import syssys.executable两者路径不一我采用将jupyter的路径改成与命令行中相同在 ***** \Anaconda\share\jupyter\kernels\python

2020-06-16 17:31:38 2861 2

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除