如何选择 "cat.item.category"
Pypark中的列?模式如下:,
root
|-- result: struct (nullable = true)
| |-- active: string (nullable = true)
| |-- cat_item.category: struct (nullable = true)
| | |-- display_value: string (nullable = true)
| | |-- link: string (nullable = true)
| |-- number: string (nullable = true)
| |-- sys_id: string (nullable = true)
我试过下面的方法,但出现了一个错误,
df22 = df22.select("result.active", "result.cat_item.category.display_value", "result.cat_item.category.link", "result.number", "result.sys_id")
如何选择结构列?
1条答案
按热度按时间7vux5j2d1#
字段名包含一个点
.
,您需要使用backtick `: