小编Anu*_*p K的帖子

如何修改pyspark dataframe嵌套结构列

我正在尝试对嵌套列进行匿名/哈希处理,但没有成功。该架构看起来像这样:

-- abc: struct (nullable = true)
|    |-- xyz: struct (nullable = true)
|    |    |-- abc123: string (nullable = true)
|    |    |-- services: struct (nullable = true)
|    |    |    |-- service: array (nullable = true)
|    |    |    |    |-- element: struct (containsNull = true)
|    |    |    |    |    |-- type: string (nullable = true)
|    |    |    |    |    |-- subtype: string (nullable = true)
Run Code Online (Sandbox Code Playgroud)

我需要更改(匿名/哈希)type列的值。

struct dataframe apache-spark apache-spark-sql pyspark

4
推荐指数
1
解决办法
3686
查看次数