Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
Spark DataFrame 删除重复项并保留第一个
问题 在 pandas 中 当删除重复项时 您可以指定要保留哪些列 Spark Dataframes 中有等效的吗 Pandas df sort values actual datetime ascending False drop dup
DataFrame
apachespark
PySpark
apachesparksql
duplicates
如何加入数据框(来自数据集的集合)?
我正在寻找并找出最好的加入方式nSpark 数据帧 Example List df1 df2 df3 dfN 哪里都df有一个我可以参加的约会 递归 像这样 List df1 df2 df3 dfN reduce a b gt a join
scala
apachespark
apachesparksql
如何从 Spark UI 检索输出大小和写入记录等指标?
如何在任务或作业完成后立即在控制台 Spark Shell 或 Spark 提交作业 上收集这些指标 我们使用 Spark 将数据从 Mysql 加载到 Cassandra 数据非常庞大 例如 200 GB 和 600M 行 当任务完成后
使用 selectExpr 选择其中包含特殊字符的 Spark 数据框列
我所处的场景是我的列名称Munic pio字母上有重音 My selectExpr命令因此失败 有办法解决吗 基本上我有类似以下的表达式 selectExpr CAST Munic pio as string as Munic pio 我真
PySpark
apachesparksql
specialcharacters
azuredatabricks
在 Spark Dataframe 中将空值替换为 null
我有一个包含 n 列的数据框 我想用空值替换所有这些列中的空字符串 我尝试使用 val ReadDf rawDF na replace columnA Map gt null and val ReadDf rawDF withColumn
scala
apachespark
DataFrame
apachesparksql
优化spark sql中分区数据写入S3
我在每个 Spark 作业运行中从 HDFS 读取大约 700 GB 的数据 我的工作读取这些数据 过滤大约 60 的数据 将其分区如下 val toBePublishedSignals hiveCtx sql some query toB
scala
apachespark
amazons3
apachesparksql
Spark 使用自定义架构读取镶木地板
我正在尝试使用自定义架构导入镶木地板格式的数据 但它返回 类型错误 option 缺少 1 个必需的位置参数 值 ProductCustomSchema StructType StructField id sku IntegerType T
apachespark
PySpark
apachesparksql
在 pyspark 中实现递归算法以查找数据帧中的配对
我有一个火花数据框 prof student df 列出了时间戳的学生 教授对 每个时间戳有 4 位教授和 4 位学生 每个教授 学生对都有一个 分数 因此每个时间范围有 16 行 对于每个时间范围 我需要找到教授 学生之间的一对一配对 以
python
apachespark
PySpark
apachesparksql
PySpark 将“map”类型的列转换为数据框中的多列
Input 我有一个专栏Parameters类型的map形式 from pyspark sql import SQLContext sqlContext SQLContext sc d Parameters foo 1 bar 2 baz
python
apachespark
DataFrame
PySpark
apachesparksql
Spark Dataframe 列可为 null 的属性更改
我想更改 Spark Dataframe 中特定列的可为空属性 如果我当前打印数据框的模式 它看起来如下所示 col1 string nullable false col2 string nullable true col3 string
scala
apachespark
apachesparksql
如何找到两个数组列之间的共同元素?
我有两个以逗号分隔的字符串列 sourceAuthors and targetAuthors val df Seq Author1 Author2 Author3 Author2 Author3 Author1 toDF source ta
scala
apachespark
apachesparksql
如何解决错误“AttributeError:‘SparkSession’对象没有属性‘序列化器’?
我正在使用 pyspark 数据框 我有一些代码试图在其中转换dataframe to an rdd 但我收到以下错误 AttributeError SparkSession 对象没有属性 序列化器 可能是什么问题 training tes
apachespark
PySpark
apachesparksql
在 PySpark 中展平动态嵌套结构(结构内的结构)
我正在努力展平结构内有结构的 JSON 模式 问题是内部结构名称是动态的 因此我无法使用 轻松访问它们 概念 该架构类似于 root A string nullable true Plugins struct nullable true R
python
json
apachesparksql
PySpark
如何在 PySpark 数据框中创建动态组?
虽然问题是基于连续行的两个或多个列的值创建多个组 但我只是通过这种方式简化问题 假设有这样的 pyspark 数据框 gt gt gt df sqlContext createDataFrame Row SN 1 age 45 gender
scala
groupby
PySpark
apachesparksql
RDD
Spark:将 bytearray 转换为 bigint
尝试使用 pyspark 和 Spark sql 将 kafka 键 二进制 字节数组 转换为 long bigint 会导致数据类型不匹配 无法将二进制转换为 bigint 环境详情 Python 3 6 8 Anaconda custo
apachespark
PySpark
ApacheKafka
apachesparksql
Sparksql 多条件过滤(使用where子句选择)
您好 我有以下问题 numeric registerTempTable numeric 我想要过滤的所有值都是文字空字符串 而不是 N A 或空值 我尝试了这三个选项 numeric filtered numeric filter nume
python
sql
apachespark
apachesparksql
PySpark
Spark:相当于数据帧中的 zipwithindex
假设我有以下数据框 dummy data a 1 b 25 c 3 d 8 e 1 df sc parallelize dummy data toDF letter number 我想创建以下数据框 a 0 b 2 c 1 d 3 e 0
python
apachespark
PySpark
apachesparksql
Spark 两个分区数据帧之间的共置连接
对于以下两个之间的连接DataFrames在 Spark 1 6 0 中 val df0Rep df0 repartition 32 col a cache val df1Rep df1 repartition 32 col a cache
scala
join
apachespark
apachesparksql
在 IDEA 中运行 Spark on Hive 项目期间创建事务连接工厂时出错
我正在尝试为 Spark Streaming 项目设置一个开发环境 该项目需要将数据写入 Hive 我有一个包含 1 个主设备 2 个从设备和 1 台开发机器的集群 在 Intellij Idea 14 中编码 在 Spark shell
apachespark
hive
apachesparksql
MetaStore
在 Spark SQL 中将结构转换为映射
我正在尝试转换一个数据集 该数据集声明一列具有特定的struct类型 例如struct
apachespark
apachesparksql
1
2
3
4
5
6
...41
»