上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 24 下一页
摘要: features = [] diff_windowns = [1,3,6,12] groups = ['sum','mean','std','max','min','count'] for d in diff_windowns: exec("""last_{}_month = df[df['diff 阅读全文
posted @ 2021-12-10 11:42 cup_leo 阅读(475) 评论(0) 推荐(0)
摘要: Spark性能优化指南——基础篇 - 美团技术团队 (meituan.com) Spark性能优化指南——高级篇 - 美团技术团队 (meituan.com) 阅读全文
posted @ 2021-12-09 17:05 cup_leo 阅读(133) 评论(0) 推荐(0)
摘要: #定义合并函数:将有共同核心点的临时聚类簇合并 test_list_set = [{1,2,3},{3,4,5},{10,12,13},{4,5,8},{13,15},{7,8},{20,22}] result = [] for index, t0 in enumerate(test_list_se 阅读全文
posted @ 2021-12-08 16:28 cup_leo 阅读(79) 评论(0) 推荐(0)
摘要: 1. 基本原理其实,这种问题本来是很容易解决的,只要设计好了数据相似度的度量方法(有关相似度量的方法详细可参考我之前的博客:数据相似性的度量方法总结)计算所有数据与查询的距离,比较大小即可。但是随着数据量的增大以及数据维度的提高,这种方法就很难在现实中应用了,因为效率会非常低。解决此类问题的思路基本 阅读全文
posted @ 2021-12-08 11:35 cup_leo 阅读(87) 评论(0) 推荐(0)
摘要: 1、(45条消息) PySpark SQL常用语法_baidu_26454813的博客-CSDN博客_pyspark sql 2、spark dataframe新增一列的四种方法: spark dataframe新增一列的四种方法【附源码】_香山上的麻雀_51CTO博客 3、Spark Repart 阅读全文
posted @ 2021-12-07 14:39 cup_leo 阅读(241) 评论(0) 推荐(0)
摘要: Apache Spark是一个对开发者提供完备的库和API的集群计算系统,并且支持多种语言,包括Java,Python,R和Scala。SparkSQL相当于Apache Spark的一个模块,在DataFrame API的帮助下可用来处理非结构化数据。 通过名为PySpark的Spark Pyth 阅读全文
posted @ 2021-12-07 11:08 cup_leo 阅读(976) 评论(0) 推荐(0)
摘要: Spark与Pandas中DataFrame对比(详细) Pandas Spark 工作方式 单机single machine tool,没有并行机制parallelism不支持Hadoop,处理大量数据有瓶颈 分布式并行计算框架,内建并行机制parallelism,所有的数据和操作自动并行分布在各 阅读全文
posted @ 2021-11-29 09:46 cup_leo 阅读(320) 评论(0) 推荐(0)
摘要: Python中操作SQLAlchemy,SQLAlchemy中文技术文档 - 简书 (jianshu.com) 阅读全文
posted @ 2021-11-26 13:55 cup_leo 阅读(117) 评论(0) 推荐(0)
摘要: #Rouge gram-1,2,4,SU4 def Rouge_1(pred, true): #结巴精准分词 gram_1_true = list(jieba.cut(true)) gram_1_pred = list(jieba.cut(pred)) #统计参考摘要长度、预测摘要长度、预测正确的摘 阅读全文
posted @ 2021-11-26 12:46 cup_leo 阅读(832) 评论(0) 推荐(0)
摘要: def mode(arr): dict_cnt = {} for x in arr: dict_cnt[x] = dict_cnt.get(x,0)+1 max_cnt = max(dict_cnt.values()) most_values = [k for k,v in dict_cnt.ite 阅读全文
posted @ 2021-11-25 11:37 cup_leo 阅读(532) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 24 下一页