问题&解决方案
文章平均质量分 78
Sinsa_SI
数据玩家 | 风控小匠 | 励志学长 的自媒体。
分享数据、风控、反欺诈、励志等方面经验和知识。
展开
-
【解决方案】hive 构造给定大小的数组 array
需求现有如下数据表 table_1aba13a22a31想要得到的结果表为 table_2aba13a13a13a22a22a31方案从表 table_1 到 table_2,实际就是对数据按照 b 列的取值进行展开,如 b 列取值为 3 时所在行展开为 3 行。分析思路如下:...原创 2020-04-20 19:39:37 · 2797 阅读 · 1 评论 -
【解决方案】ValueError: Some of types cannot be determined by the first 100 rows
问题在 spark 中试图将 RDD 转换成 DataFrame 时,有时会提示 ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling,此时有 2 种解决方案:方案一:提高数据采样率(sampling ratio)sqlContext.creat...原创 2020-04-01 11:23:54 · 2524 阅读 · 0 评论 -
【解决方案】pyspark 绘图报错:_tkinter.TclError: no display name and no $DISPLAY environment variable
问题描述matplotlib画图失败(pyspark、pyspark3),报错如下:no display name and no $DISPLAY environment variableTraceback (most recent call last): File "<stdin>", line 21, in plot_with_labels File "/usr/in...原创 2019-10-31 19:11:18 · 2246 阅读 · 1 评论 -
Mac 上使用 SAS 的 2 种方法
方法一、下载安装学生版 SAS安装说明:https://www.sas.com/en_us/software/university-edition/download-software.html#osx-setup包含的模块:---Base SAS 软件---SAS/STAT---SAS/ETS---SAS/IML---SAS/ACCESS Interface to...原创 2019-06-11 17:10:30 · 14034 阅读 · 2 评论 -
[解决办法] Caused by: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
原始代码select regexp_replace(string_data, "\\*+", "%") as new_stringfrom test_tb报错信息Caused by: java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0 分析过程因为+、*、|、\等符号在正则...原创 2018-11-20 14:21:38 · 3026 阅读 · 3 评论 -
[解决办法] Invalid PythonUDF <lambda>(), requires attributes from more than one child.
[解决办法] Invalid PythonUDF (), requires attributes from more than one child.报题中的错误,解决办法:在过滤过程前 加 df.cache() (这里的 df 为过滤的 DataFrame)The sequence of steps that causes this are:join two dataframes A a...原创 2018-10-17 19:51:47 · 1873 阅读 · 0 评论 -
记一次被“呼死你”电话骚扰的反骚扰经历
一、事件回放2018 年 7 月 23 日下午 6:23,接到了来自 010-53565784 的电话。对方声称是爱上街催收的,要求我通知薛**及时还清在爱上街 app 上借款。同时,还告知说薛**借款时将我的手机号填写为紧急联系人。一肚子气啊,自己交友不慎啊。就挂了电话。稍后微信有人添加好友。备注的信息和通话内容差不多。多了一句“不然打到你们转告为止”。当时没留意上面那句话,直到第二...原创 2018-07-29 17:56:53 · 21072 阅读 · 0 评论 -
pandas dataFrame to_excel 报错[ UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 7
pandas dataFrame to_excel 报错 [ UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position 7: ordinal not in range(128) ] 解决方案原创 2017-11-17 14:26:00 · 8008 阅读 · 0 评论 -
CParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file
CParserError: Error tokenizing data. C error: Buffer overflow caught - possible malformed input file原创 2017-06-06 19:52:30 · 6982 阅读 · 0 评论 -
Linux报bus error(总线错误)解决办法
最近工作中遇到在Linux服务器上运行python程序时,能够正常import其自带的包,如re、sys等,但无法import外在安装的包,如MySQL、pymongo、elasticsearch等,只要执行这种import操作,python就会自动退出,并报bus error错误,即总线错误。另外,安装在该服务器上的mongodb也不能够访问,报connect failed 错误。原创 2016-04-08 22:29:16 · 65423 阅读 · 8 评论 -
python安装包方法失效或缺失问题
问题提出 最近遇到两个python安装包文件缺失的问题,一是MySQL包提示缺失image,另一个是pymongo提示数据库方法缺失问题。原创 2016-03-31 17:41:33 · 3210 阅读 · 1 评论 -
关于SYP'BLOG,关于Problem&Solutions
关于SYP’BLOG 最近看了公司不少大牛的个人技术博客,工作了一年多的我,决定需要从新开始自己的博客之路,让知识在这里沉淀,深远点,就是在此传播。古人云:好记性不如烂笔头。读了19年的书,这一点深有体会,产出是最好的吸收。关于Problem&Solutions Problem&Solutions是整个博客的一个大类,专门记录工作中遇到的各种问题。该分类的想法来自伟哥的博客,里面记录着自己原创 2016-01-14 21:47:27 · 461 阅读 · 1 评论