How to use the pandasgui.widgets.grapher.Worker function in pandasgui

To help you get started, we’ve selected a few pandasgui 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 adamerose / pandasgui / pandasgui / widgets / grapher.py View on Github external
if not any(kwargs.values()):
            for arg_name in self.prev_kwargs.keys():
                if arg_name in self.current_schema.args.keys():
                    kwargs[arg_name] = self.prev_kwargs[arg_name]
                    widget = self.schema_widgets[arg_name]
                    widget.blockSignals(True)
                    widget.setCurrentText(kwargs[arg_name])
                    widget.blockSignals(False)

        self.prev_kwargs = kwargs

        logger.debug("2 " + str(kwargs))
        # Copy because sometimes df gets deleted somehow?
        kwargs["data_frame"] = self.df.copy()
        func = self.current_schema.function
        self.current_worker = Worker(func, kwargs)
        self.current_worker.finished.connect(self.worker_callback)
        self.current_worker.finished.connect(self.current_worker.deleteLater)
        self.current_worker.start()
        self.workers.append(self.current_worker)