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