python
amiliaaaa
这个作者很懒,什么都没留下…
展开
-
Python MemoryError
程序已经跑了一段时间,突然出现MemoryError的问题,查了一下往上有一些处理方法,包括:1. 32位更新成64位,出现问题部分包括python,pandas,numpy2. 逐行读取数据3. 扩充虚拟内存等ref:https://blog.csdn.net/ainivip/article/details/101316093但是我懒了一下先看了下数据,然后发现应该是一条数...原创 2019-12-13 16:55:26 · 253 阅读 · 0 评论 -
dataframe object has no attribute decode
python3.6dataframe数据类型不符合,用str()将数据类型改为string即可原创 2018-07-17 14:17:21 · 11062 阅读 · 0 评论 -
python生成中文词云(Linux centos7,anaconda3,pycharm)及中文不显示问题
试了一下生成词云,还是听简单的。前面是遇到的问题,后附代码。----------------------------------------------需要的packages:wordcloudjiebamatplotlib1. 在安装时需要安装到正确的环境中,不然会出现安装成功但无法import的情况2. 使用 conda list 可以看到有,但是用 conda install *** 安装失...原创 2018-07-11 10:29:53 · 1927 阅读 · 0 评论 -
module 'scipy' has no attribute 'spatical'
这个错真的是真.一脸懵逼from scipy import spatial报错:ImportError: cannot import name 'spatial'import scipyscipy.spatial报错:AttributeError: module 'scipy' has no attribute 'spatial'解决方法是:import scipy...原创 2019-04-17 10:49:46 · 7099 阅读 · 3 评论 -
gensim.model.word2vec参数
def __init__(self, sentences=None, corpus_file=None, size=100, alpha=0.025, window=5, min_count=5,...翻译 2019-04-24 10:32:34 · 549 阅读 · 0 评论 -
数据预处理——in updating
利用内置方法及re模块保留汉字rere.findall(u'[\u4e00-\u9fff]+', a_str)保留汉字、换行符rere.findall(u'[\u4e00-\u9fff\n]+', a_str)list to stringa_str = ' '.join(a_list) string to lista_list = a_str.split('...原创 2019-04-25 16:08:01 · 217 阅读 · 0 评论