Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more file type export options to GUI.py #158

Open
rjsdotorg opened this issue Jul 15, 2021 · 0 comments
Open

Add more file type export options to GUI.py #158

rjsdotorg opened this issue Jul 15, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@rjsdotorg
Copy link

Since PG allows modifications and joins, I wanted to re-save the pickles.
In GUI.py at 351, I simply added more options.

    def export_dialog(self):
        dialog = QtWidgets.QFileDialog()
        pgdf = self.store.selected_pgdf
        path, _ = dialog.getSaveFileName(directory=pgdf.name, filter="CSV (*.csv);;Python files (*.pkl *.hdf *.sql)")
        if path:
            if path[-3:]== 'csv':
                pgdf.df.to_csv(path, index=False)
            elif path[-3:]== 'pkl':
                pgdf.df.to_pickle(path)
            elif path[-3:]== 'hdf':
                pgdf.df.to_hdf(path)
            elif path[-3:]== 'sql':
                pgdf.df.to_sql(path)
@rjsdotorg rjsdotorg added the enhancement New feature or request label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant