adamerose / adamerose/PandasGUI

Add more file type export options to GUI.py

Open
#158 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
3.3k
Forks
239
PR merge metrics
No merged PRs in 30d

Description

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)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.