Column.
__getattr__
An expression that gets an item at position ordinal out of a list, or gets an item by key out of a dict.
ordinal
New in version 1.3.0.
Changed in version 3.4.0: Supports Spark Connect.
a literal value.
Column
Column representing the item got by key out of a dict.
Examples
>>> df = spark.createDataFrame([('abcedfg', {"key": "value"})], ["l", "d"]) >>> df.select(df.d.key).show() +------+ |d[key]| +------+ | value| +------+