Filters out rows that contain errors. Example: >>> import pathway as pw >>> t1 = pw.debug.table_from_markdown( ... ''' ... a | b ... 3 | 3 ... 4 | 0 ... 5 | 5 ... 6 | 2 ... ''' ... )
(self)
| 2751 | @trace_user_frame |
| 2752 | @contextualized_operator |
| 2753 | def remove_errors(self) -> Table[TSchema]: |
| 2754 | """Filters out rows that contain errors. |
| 2755 | |
| 2756 | Example: |
| 2757 | |
| 2758 | >>> import pathway as pw |
| 2759 | >>> t1 = pw.debug.table_from_markdown( |
| 2760 | ... ''' |
| 2761 | ... a | b |
| 2762 | ... 3 | 3 |
| 2763 | ... 4 | 0 |
| 2764 | ... 5 | 5 |
| 2765 | ... 6 | 2 |
| 2766 | ... ''' |
| 2767 | ... ) |
| 2768 | >>> t2 = t1.with_columns(x=pw.this.a // pw.this.b) |
| 2769 | >>> res = t2.remove_errors() |
| 2770 | >>> pw.debug.compute_and_print(res, include_id=False, terminate_on_error=False) |
| 2771 | a | b | x |
| 2772 | 3 | 3 | 1 |
| 2773 | 5 | 5 | 1 |
| 2774 | 6 | 2 | 3 |
| 2775 | """ |
| 2776 | context = clmn.FilterOutValueContext(self._id_column, api.ERROR) |
| 2777 | return self._table_with_context(context) |
| 2778 | |
| 2779 | def await_futures(self) -> Table[TSchema]: |
| 2780 | """Waits for the results of asynchronous computation. |