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)
| 594 | return new_collection(self.expr.lower_once({})) |
| 595 | |
| 596 | def optimize(self, fuse: bool = True): |
| 597 | """Optimizes the DataFrame. |
| 598 | |
| 599 | Runs the optimizer with all steps over the DataFrame and wraps the result in a |
| 600 | new DataFrame collection. Only use this method if you want to analyze the |
| 601 | optimized expression. |
| 602 | |
| 603 | Parameters |
| 604 | ---------- |
| 605 | fuse: bool, default True |
| 606 | Whether to fuse the expression tree after running the optimizer. |
| 607 | It is often easier to look at the non-fused expression when analyzing |
| 608 | the result. |
| 609 | |
| 610 | Returns |
| 611 | ------- |
| 612 | The optimized Dask Dataframe |
| 613 | """ |
| 614 | return new_collection(self.expr.optimize(fuse=fuse)) |
| 615 | |
| 616 | def __dask_postcompute__(self): |
| 617 | state = new_collection(self.expr.lower_completely()) |
no test coverage detected