摘要: 从gbk 格式 转化成 utf-8格式 cat SogouCA.txt | iconv -f gbk -t utf-8 -c > SougouCA_UTF8.txt 阅读全文
posted @ 2019-12-31 15:08 FQ&A 阅读(377) 评论(0) 推荐(0) 编辑
摘要: data.where(data.notnull(), None) 阅读全文
posted @ 2019-10-11 11:45 FQ&A 阅读(464) 评论(0) 推荐(0) 编辑
摘要: import jsonimport timeimport requests class exportEsData(): size = 10000 def __init__(self, url,index,type): self.url = url+"/"+index+"/"+type+"/_sear 阅读全文
posted @ 2019-09-24 19:50 FQ&A 阅读(765) 评论(0) 推荐(0) 编辑
摘要: #将dataframe转化成json文件时候,head文件发现文件不是中文 解决方案: all_insurance.to_json("scrapy_insurance_kc.json", orient="records", lines=True, force_ascii=False) 阅读全文
posted @ 2019-08-09 16:28 FQ&A 阅读(1940) 评论(0) 推荐(0) 编辑
摘要: 1 df = pd.DataFrame({'A':df.A.repeat(df.B.str.len()),'B':np.concatenate(df.B.values)}) 阅读全文
posted @ 2019-08-07 23:27 FQ&A 阅读(1879) 评论(0) 推荐(0) 编辑
摘要: 使用pandas读取.xls异常 xls 是保存喂97-03xls格式 head *.xls 文件发现是html 解决方案 pd.read_html("*.xls",encoding="GBK") 阅读全文
posted @ 2019-07-19 23:03 FQ&A 阅读(1381) 评论(0) 推荐(0) 编辑
摘要: 使用pyspark时要注意 pyspark_python 设置为python3.5 ,可以使用ml,运行环境也应该是python3.5,版本必须一致,不然会报错。 import findspark findspark.init() import pandas as pd import numpy a 阅读全文
posted @ 2019-06-26 22:33 FQ&A 阅读(4178) 评论(0) 推荐(0) 编辑
摘要: 今天用xgboost跑了一下分类发生如下报错: A worker process managed by the executor was unexpectedly terminated. This could be caused by a segmentation fault while calli 阅读全文
posted @ 2019-06-25 23:31 FQ&A 阅读(2129) 评论(0) 推荐(0) 编辑