Optimizes the DataFrame. Runs the optimizer with all steps over the DataFrame and wraps the result in a new DataFrame collection. Only use this method if you want to analyze the optimized expression. Parameters ---------- fuse: bool, default True
(self, fuse: bool = True)
| 554 | return new_collection(self.expr.lower_once({})) |
| 555 | |
| 556 | def optimize(self, fuse: bool = True): |
| 557 | """Optimizes the DataFrame. |
| 558 | |
| 559 | Runs the optimizer with all steps over the DataFrame and wraps the result in a |
| 560 | new DataFrame collection. Only use this method if you want to analyze the |
| 561 | optimized expression. |
| 562 | |
| 563 | Parameters |
| 564 | ---------- |
| 565 | fuse: bool, default True |
| 566 | Whether to fuse the expression tree after running the optimizer. |
| 567 | It is often easier to look at the non-fused expression when analyzing |
| 568 | the result. |
| 569 | |
| 570 | Returns |
| 571 | ------- |
| 572 | The optimized Dask Dataframe |
| 573 | """ |
| 574 | return new_collection(self.expr.optimize(fuse=fuse)) |
| 575 | |
| 576 | def __dask_postcompute__(self): |
| 577 | state = new_collection(self.expr.lower_completely()) |
no test coverage detected