列表#

以下方法可在 expr.list 属性下使用。

Expr.list.all()

评估列表中所有布尔值是否为真。

Expr.list.any()

评估列表中是否有任何布尔值为真。

Expr.list.arg_max()

检索每个子列表中最大值的索引。

Expr.list.arg_min()

检索每个子列表中最小值的索引。

Expr.list.concat(other)

在线性时间内连接Series dtype List中的数组。

Expr.list.contains(item)

检查子列表是否包含给定的项目。

Expr.list.count_matches(element)

计算由element生成的值出现的频率。

Expr.list.diff([n, null_behavior])

计算每个子列表中偏移项之间的第一个离散差异。

Expr.list.drop_nulls()

删除列表中的所有空值。

Expr.list.eval(expr, *[, parallel])

对列表的元素运行任何polars表达式。

Expr.list.explode()

返回一个列,其中每个列表元素都有一行。

Expr.list.first()

获取子列表的第一个值。

Expr.list.gather(indices, *[, null_on_oob])

通过多个索引获取子列表。

Expr.list.gather_every(n[, offset])

从子列表中的偏移量开始,每隔n个值取一个。

Expr.list.get(index, *[, null_on_oob])

通过索引在子列表中获取值。

Expr.list.head([n])

切片每个子列表的前n个值。

Expr.list.join(separator, *[, ignore_nulls])

将子列表中的所有字符串项连接起来,并在它们之间放置一个分隔符。

Expr.list.last()

获取子列表的最后一个值。

Expr.list.len()

返回每个列表中的元素数量。

Expr.list.max()

计算数组中列表的最大值。

Expr.list.mean()

计算数组中列表的平均值。

Expr.list.median()

计算数组中列表的中位数值。

Expr.list.min()

计算数组中列表的最小值。

Expr.list.n_unique()

计算每个子列表中唯一值的数量。

Expr.list.reverse()

反转列表中的数组。

Expr.list.sample([n, fraction, ...])

从这个列表中取样。

Expr.list.set_difference(other)

计算此列表中元素与other中元素的集合差。

Expr.list.set_intersection(other)

计算此列表中的元素与other中的元素之间的集合交集。

Expr.list.set_symmetric_difference(other)

计算此列表中元素与other中元素的对称差集。

Expr.list.set_union(other)

计算此列表中的元素与other中的元素之间的集合并集。

Expr.list.shift([n])

将列表值按给定的索引数移动。

Expr.list.slice(offset[, length])

切片每个子列表。

Expr.list.sort(*[, 降序, 空值最后])

对此列中的列表进行排序。

Expr.list.std([ddof])

计算数组中列表的标准差值。

Expr.list.sum()

对数组中的所有列表求和。

Expr.list.tail([n])

切片每个子列表的最后 n 个值。

Expr.list.to_array(width)

将列表列转换为具有相同内部数据类型的数组列。

Expr.list.to_struct([n_field_strategy, ...])

将类型为 List 的 Series 转换为类型为 Struct 的 Series。

Expr.list.unique(*[, 保持顺序])

获取列表中的唯一/不同值。

Expr.list.var([ddof])

计算数组中列表的var值。