How to use the modin.engines.python.pandas_on_python.frame.partition.PandasOnPythonFramePartition function in modin

To help you get started, we’ve selected a few modin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github modin-project / modin / modin / engines / python / pandas_on_python / frame / partition.py View on Github external
def add_to_apply_calls(self, func, **kwargs):
        return PandasOnPythonFramePartition(
            self.data.copy(), call_queue=self.call_queue + [(func, kwargs)]
        )
github modin-project / modin / modin / engines / python / pandas_on_python / frame / partition.py View on Github external
applied to it.
        """

        def call_queue_closure(data, call_queues):
            result = data.copy()
            for func, kwargs in call_queues:
                try:
                    result = func(result, **kwargs)
                except Exception as e:
                    self.call_queue = []
                    raise e
            return result

        self.data = call_queue_closure(self.data, self.call_queue)
        self.call_queue = []
        return PandasOnPythonFramePartition(func(self.data.copy(), **kwargs))