polars.collect_all#
- polars.collect_all(
- lazy_frames: Iterable[LazyFrame],
- *,
- type_coercion: bool = True,
- _type_check: bool = True,
- predicate_pushdown: bool = True,
- projection_pushdown: bool = True,
- simplify_expression: bool = True,
- no_optimization: bool = False,
- slice_pushdown: bool = True,
- comm_subplan_elim: bool = True,
- comm_subexpr_elim: bool = True,
- cluster_with_columns: bool = True,
- collapse_joins: bool = True,
- streaming: bool = False,
- _check_order: bool = True,
同时收集多个LazyFrames。
这会在Polars线程池中并行运行所有的计算图。
- Parameters:
- lazy_frames
要收集的LazyFrame列表。
- type_coercion
进行类型强制优化。
- predicate_pushdown
执行谓词下推优化。
- projection_pushdown
执行投影下推优化。
- simplify_expression
运行简化表达式优化。
- no_optimization
关闭优化。
- slice_pushdown
切片下推优化。
- comm_subplan_elim
将尝试缓存出现在自连接或联合上的分支子计划。
- comm_subexpr_elim
常见的子表达式将被缓存并重复使用。
- cluster_with_columns
将连续的独立调用合并到with_columns
- collapse_joins
将连接和过滤器合并为更快的连接
- streaming
分批处理查询以处理大于内存的数据。 如果设置为
False(默认值),则整个查询将在单个批次中处理。警告
流模式被认为是不稳定的。它可能会在任何时候更改,而不被视为破坏性更改。
注意
使用
explain()来查看 Polars 是否可以在流模式下处理查询。
- Returns:
- list of DataFrames
收集的DataFrames,按照输入LazyFrames的顺序返回。