adamerose / pandasgui Goto Github PK
View Code? Open in Web Editor NEWA GUI for Pandas DataFrames
License: MIT No Attribution
A GUI for Pandas DataFrames
License: MIT No Attribution
I created a new test environment as follows:
conda create -n pandasgui_test python=3.8
conda install jupyter
pip install pandasgui
Then I ran this from a Jupyter-Notebook:
from pandasgui import show
import numpy as np
df = DataFrame(np.random.randint(0, 100, (100, 150)))
show(df)
which raises:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-65274c620237> in <module>
----> 1 from pandasgui import show
2 import numpy as np
3 df = DataFrame(np.random.randint(0, 100, (100, 150)))
4 show(df)
~/miniconda3/envs/pandasgui_test/lib/python3.8/site-packages/pandasgui/__init__.py in <module>
----> 1 from pandasgui.gui import show
2
3 __all__ = ["show"]
~/miniconda3/envs/pandasgui_test/lib/python3.8/site-packages/pandasgui/gui.py in <module>
12 from pandasgui.store import Store, PandasGuiDataFrame
13 from pandasgui.utility import fix_ipython, fix_pyqt, get_logger, as_dict, delete_datasets
---> 14 from pandasgui.widgets.dataframe_explorer import DataFrameExplorer
15 from pandasgui.widgets.find_toolbar import FindToolbar
16 from pandasgui.widgets.json_viewer import JsonViewer
~/miniconda3/envs/pandasgui_test/lib/python3.8/site-packages/pandasgui/widgets/dataframe_explorer.py in <module>
7 from pandasgui.utility import get_logger, nunique
8 from pandasgui.widgets.dataframe_viewer import DataFrameViewer
----> 9 from pandasgui.widgets.grapher import Grapher
10 from pandasgui.widgets.reshaper import Reshaper
11 from pandasgui.widgets.filter_viewer import FilterViewer
~/miniconda3/envs/pandasgui_test/lib/python3.8/site-packages/pandasgui/widgets/grapher.py in <module>
13
14 from pandasgui.utility import flatten_df, get_logger
---> 15 from pandasgui.widgets.plotly_viewer import PlotlyViewer
16 from pandasgui.widgets.spinner import Spinner
17 from pandasgui.widgets.dragger import Dragger, ColumnArg, Schema
~/miniconda3/envs/pandasgui_test/lib/python3.8/site-packages/pandasgui/widgets/plotly_viewer.py in <module>
27 app.__init__(sys.argv)
28 else:
---> 29 raise e
30
31
~/miniconda3/envs/pandasgui_test/lib/python3.8/site-packages/pandasgui/widgets/plotly_viewer.py in <module>
15 # https://stackoverflow.com/a/57436077/3620725
16 try:
---> 17 from PyQt5 import QtWebEngineWidgets
18 except ImportError as e:
19 if e.msg == "QtWebEngineWidgets must be imported before a QCoreApplication instance is created":
ImportError: /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2: symbol k5_buf_data, version krb5support_0_MIT not defined in file libkrb5support.so.0 with link time reference
I'm trying to run the code on the GitHub page to show the iris and flight dataframes in ipython3 with python3 from python.org under macOS 10.14.5. There is no matplotlibrc file so the Matplotlib backend defaults to 'MacOSX' and I get the ImportError. If I set the backend to Qt5Agg or Qt5Cairo everything works. Is it possible for pandasgui to set the backend, or to add a note to the home page that this is necessary?
python 3.7.3
pandas 0.24.2
matplotlib 3.1.0
PyQt5 5.12.2
PyQt5-sip 4.19.17
This is a great way to view dataframes, especially larger ones. Thanks!
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-16-c5c5d8976c89> in <module>
1 import pandas as pd
----> 2 from pandasgui import show
3 df = pd.DataFrame(([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c'])
4 show(df)
/opt/conda/lib/python3.7/site-packages/pandasgui/__init__.py in <module>
----> 1 from pandasgui.gui import show
2
3 __all__ = ["show"]
/opt/conda/lib/python3.7/site-packages/pandasgui/gui.py in <module>
7 import pandas as pd
8 import pkg_resources
----> 9 from PyQt5 import QtCore, QtGui, QtWidgets
10 from PyQt5.QtCore import Qt
11
ImportError: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.15' not found (required by /opt/conda/lib/python3.7/site-packages/PyQt5/QtCore.abi3.so)
Seems like the issue is caused by a wrong qmake version based on the anaconda defaults:
!qmake --version
QMake version 3.1
Using Qt version 5.9.7 in /opt/conda/lib
!qmake -query
QT_SYSROOT:
QT_INSTALL_PREFIX:/opt/conda
QT_INSTALL_ARCHDATA:/opt/conda
QT_INSTALL_DATA:/opt/conda
QT_INSTALL_DOCS:/opt/conda/doc
QT_INSTALL_HEADERS:/opt/conda/include/qt
QT_INSTALL_LIBS:/opt/conda/lib
QT_INSTALL_LIBEXECS:/opt/conda/libexec
QT_INSTALL_BINS:/opt/conda/bin
QT_INSTALL_TESTS:/opt/conda/tests
QT_INSTALL_PLUGINS:/opt/conda/plugins
QT_INSTALL_IMPORTS:/opt/conda/imports
QT_INSTALL_QML:/opt/conda/qml
QT_INSTALL_TRANSLATIONS:/opt/conda/translations
QT_INSTALL_CONFIGURATION:/opt/conda
QT_INSTALL_EXAMPLES:/opt/conda/examples
QT_INSTALL_DEMOS:/opt/conda/examples
QT_HOST_PREFIX:/opt/conda
QT_HOST_DATA:/opt/conda
QT_HOST_BINS:/opt/conda/bin
QT_HOST_LIBS:/opt/conda/lib
QMAKE_SPEC:linux-g++
QMAKE_XSPEC:linux-g++
QMAKE_VERSION:3.1
QT_VERSION:5.9.7
I don't find the exported pictures of plotly. Maybe we can export them in the working directory ?
Hi guys,
I was trying to use pandasgui to show a DataFrame stored in feather format (access the file from here - https://github.com/shanto268/HEP_DAQ/blob/master/CrateAnalysis/processed_data/events_data_frame_800.ftr ) and ran into the following error message, not entirely sure how to resolve this.
Traceback (most recent call last):
File "gui_ana.py", line 44, in <module>
mdfo.gui()
File "/Users/sshanto/hep/hep_daq/CAMAC/CrateAnalysis/MuonDataFrame.py", line 259, in gui
show(self.events_df, settings={'block': True})
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandasgui/gui.py", line 264, in show
pandas_gui = PandasGui(settings=settings, **kwargs)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandasgui/gui.py", line 58, in __init__
self.store.add_dataframe(df, df_name)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandasgui/store.py", line 245, in add_dataframe
pgdf.dataframe_explorer = DataFrameExplorer(pgdf)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandasgui/widgets/dataframe_explorer.py", line 40, in __init__
self.statistics_tab = self.make_statistics_tab(pgdf)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandasgui/widgets/dataframe_explorer.py", line 87, in make_statistics_tab
"N Unique": pgdf.dataframe.nunique(),
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/frame.py", line 8730, in nunique
return self.apply(Series.nunique, axis=axis, dropna=dropna)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/frame.py", line 7547, in apply
return op.get_result()
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 180, in get_result
return self.apply_standard()
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 255, in apply_standard
results, res_index = self.apply_series_generator()
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 284, in apply_series_generator
results[i] = self.f(v)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/apply.py", line 109, in f
return func(x, *args, **kwds)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/base.py", line 1303, in nunique
uniqs = self.unique()
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/series.py", line 1868, in unique
result = super().unique()
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/base.py", line 1265, in unique
result = unique1d(values)
File "/Users/sshanto/anaconda3/lib/python3.8/site-packages/pandas/core/algorithms.py", line 389, in unique
uniques = table.unique(values)
File "pandas/_libs/hashtable_class_helper.pxi", line 1840, in pandas._libs.hashtable.PyObjectHashTable.unique
File "pandas/_libs/hashtable_class_helper.pxi", line 1787, in pandas._libs.hashtable.PyObjectHashTable._unique
TypeError: unhashable type: 'numpy.ndarray'
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
jupyter and jupyterlab both, in python 3.7 pipenv virtual environments, on Ubuntu 18.04.5
Hi there,
I wonder if I can run pandasgui in google colab. I tried to use the following for a virtual display but did not work
!pip install pyvirtualdisplay
from pyvirtualdisplay import Display
Display(visible=0, size=(1400, 900)).start()
Any suggestion is greatly appreciated.
Cheers,
Hossein
On Ubuntu 20, python version 3.8.2.
Doing:
pdg.show(data, settings={'block': True})
I am getting the following error:
Traceback (most recent call last):
File "/home/miguelito/Documents/GitHub/option_pricing/test_pandas.py", line 25, in
pdg.show(data, settings={'block': True})
File "/home/miguelito/.local/lib/python3.8/site-packages/pandasgui/gui.py", line 322, in show
pandas_gui = PandasGui(settings=settings, **kwargs)
TypeError: sip.wrappertype object got multiple values for keyword argument 'settings'
Hi,
I installed pandasgui
using pip
and it installed the library but I got the following error:
from PyQt5 import QtWebEngineWidgets
ImportError: /lib/x86_64-linux-gnu/libgssapi_krb5.so.2: undefined symbol: krb5_ser_context_init, version krb5_3_MIT
I am using the package in an anaconda environment with python 3.8. Is there any specific version of PyQt5
that I need to install?
Just updated, and code that used to work (from 2.3.2) now does not.
Error:
File "/home/miguelito/.local/lib/python3.8/site-packages/pandasgui/gui.py", line 319, in show
pandas_gui = PandasGui(settings=settings, **kwargs)
File "/home/miguelito/.local/lib/python3.8/site-packages/pandasgui/gui.py", line 57, in init
self.store.add_dataframe(df, df_name)
File "/home/miguelito/.local/lib/python3.8/site-packages/pandasgui/store.py", line 240, in add_dataframe
pgdf.dataframe_explorer = DataFrameExplorer(pgdf)
File "/home/miguelito/.local/lib/python3.8/site-packages/pandasgui/widgets/dataframe_explorer.py", line 48, in init
self.reshaper_tab = Reshaper(pgdf)
File "/home/miguelito/.local/lib/python3.8/site-packages/pandasgui/widgets/reshaper.py", line 30, in init
self.plot_type_picker.setWordWrap(True)
AttributeError: 'Reshaper' object has no attribute 'plot_type_picker'
first of all many thanks for creating the widgets for panda's dataframes. I use the widgets individually in my own GUI.
In my GUI I want to execute certain code once the structure of the filtered dataframe has changed. For this it would be helpful if the PandasGuiDataFrame object emits a qt signal at the end of the update() function.
If you don't like to implement this, it would be good if a small change could be made in the cast() method. Instead of testing the type hard on PandasGuiDataFrame, it would be great if you could use "isinstance". So you could create a derived class of PandasGuiDataFrame.
Hello,
I'm using Jupyter notebook with Windows 10 and the filters are not working.
When I add a filter I have this error :
Traceback (most recent call last):
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandasgui\store.py", line 199, in apply_filters
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandas\core\frame.py", line 3343, in query
result = self.loc[res]
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandas\core\indexing.py", line 879, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandas\core\indexing.py", line 1110, in _getitem_axis
return self._get_label(key, axis=axis)
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandas\core\indexing.py", line 1059, in _get_label
return self.obj.xs(label, axis=axis)
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandas\core\generic.py", line 3488, in xs
loc = self.index.get_loc(key)
File "C:\Users\User\AppData\Roaming\Python\Python37\site-packages\pandas\core\indexes\range.py", line 358, in get_loc
raise KeyError(key)
KeyError: False
And the checkbox doesn't appear in the UI :
There is also a small issue where the icons don't appear in the "Grapher" section :
Occurs if pandasgui
is imported from multiple different Python instances. Cannot fix, problem is upstream: https://bugreports.qt.io/browse/QTBUG-66014
Following advice from another closed issue from this repo tried this alternative way to run.
import pandas as pd
from pandasgui import show
from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
from PyQt5.QtWebEngineWidgets import QWebEngineView
app = QtWidgets.QApplication([])
df = pd.DataFrame(([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c'])
show(df)
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-8c40c842eba1> in <module>
1 import pandas as pd
----> 2 from pandasgui import show
3 from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
4 from PyQt5.QtWebEngineWidgets import QWebEngineView
5 app = QtWidgets.QApplication([])
~/.local/lib/python3.8/site-packages/pandasgui/__init__.py in <module>
----> 1 from pandasgui.gui import show
2
3 __all__ = ["show"]
~/.local/lib/python3.8/site-packages/pandasgui/gui.py in <module>
12 from pandasgui.store import Store, PandasGuiDataFrame
13 from pandasgui.utility import fix_ipython, fix_pyqt, get_logger, as_dict, delete_datasets
---> 14 from pandasgui.widgets.dataframe_explorer import DataFrameExplorer
15 from pandasgui.widgets.find_toolbar import FindToolbar
16 from pandasgui.widgets.json_viewer import JsonViewer
~/.local/lib/python3.8/site-packages/pandasgui/widgets/dataframe_explorer.py in <module>
7 from pandasgui.utility import get_logger, nunique
8 from pandasgui.widgets.dataframe_viewer import DataFrameViewer
----> 9 from pandasgui.widgets.grapher import Grapher
10 from pandasgui.widgets.reshaper import Reshaper
11 from pandasgui.widgets.filter_viewer import FilterViewer
~/.local/lib/python3.8/site-packages/pandasgui/widgets/grapher.py in <module>
13
14 from pandasgui.utility import flatten_df, get_logger
---> 15 from pandasgui.widgets.plotly_viewer import PlotlyViewer
16 from pandasgui.widgets.spinner import Spinner
17 from pandasgui.widgets.dragger import Dragger, ColumnArg, Schema
~/.local/lib/python3.8/site-packages/pandasgui/widgets/plotly_viewer.py in <module>
27 app.__init__(sys.argv)
28 else:
---> 29 raise e
30
31
~/.local/lib/python3.8/site-packages/pandasgui/widgets/plotly_viewer.py in <module>
15 # https://stackoverflow.com/a/57436077/3620725
16 try:
---> 17 from PyQt5 import QtWebEngineWidgets
18 except ImportError as e:
19 if e.msg == "QtWebEngineWidgets must be imported before a QCoreApplication instance is created":
ImportError: /lib/x86_64-linux-gnu/libQt5Network.so.5: undefined symbol: _ZN15QIPAddressUtils8toStringER7QStringPh, version Qt_5
And I already have installed and upgraded PyQt5 as below
pip3 install --user --upgrade PyQt5
pip3 install --user --upgrade PyQt5-sip
Are there any plans to add a feature to generate and export Python code for any transformation or visualization done in the GUI? That would be very useful for newcomers to Python/pandas/Plotly to help learn, and to use PandasGUI to bootstrap the code for more complicated scripts.
When I open pandasgui from my PyQt5 MainWindow the style of pandasgui overwrites the style of the MainWindow.
I tried to work around it by using the block setting and apply my old style to the app after I close the pandasgui, but I get "QCoreApplication::exec: The event loop is already running" when I open it blocked.
Is there another workaround? Can I somehow apply my chosen style to pandasgui while opening the gui?
from pandasgui import show
import pandas as pd
df = pd.DataFrame({'a':[1,2,3], 'b':[[1,2,3],[4,5,6],[7,8,9]]})
show(df)
Should convert to string and show warning instead of raising exception
I get a Syntax Error: invalid syntax error when I try this
Sorry for noob question but I am trying to run the application on VS Code but once I execute show(df) as specified on the demo.py file, the GUI screen opens and closes right away. I am not sure if this tool is intended to run that way. Am I missing something?
I am also getting the following message:
MatplotlibDeprecationWarning:
The matplotlib.backends.backend_qt4agg backend was deprecated in Matplotlib 3.3 and will be removed two minor releases later.
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg
Edit: I figured out how to run it. But it would be helpful if it can be run as a desktop application
Hi Adam, when I run pandasgui ..show(titanic).. from my .py file in vscode on Ubuntu, all I get is a black window with 'pandasgui' as title. After a few seconds window closes. No errors reported.
Works Ok from Jupyter Notebook in vscode.
Any suggestions?
I tried testing with both of the following code, but both times window opens, appears as 'not responding' and closed down immediately.
I am using Win 10. All dependencies are installed. Double checked.
CMD does not show any errors.
import pandas as pd
from pandasgui import show
path = "https://raw.githubusercontent.com/adamerose/datasets/master/pokemon.csv"
pokemon = pd.read_csv(path)
gui = show(pokemon)
and following too..
import pandas as pd
from pandasgui import show
df = pd.read_excel('Data.xlsx')
gui = show(df)
There's no problem in excel file, as print(df) shows as expected.
Hi,
I'm trying to use pandasgui with this constellation:
OS: Windows 10
pandasgui==0.2.5.1
plotly==4.11.0
PyQt5==5.15.0
PyQt5-sip==12.8.0
PyQtWebEngine==5.15.1
and with this Python script:
import pandas as pd
from pandasgui import show
df = pd.DataFrame(([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c'])
show(df)
Expected result
PandasGUI has opened and df can be analysed
Given result
An empty pandasgui window was opened for 2 seconds, closed without any further actions. No error message - nothing.
The output in the console:
Process returned 0 (0x0) execution time : 3.395 s
Problem: dataframes containing a column with entries of type List fail to load.
Step to reproduce: try to show() a pandas dataframe where one column is all, or has some, List objects in it.
Expected Behavior: window shows with data instead of blank.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-steph'
Traceback (most recent call last):
File "test_pandas_gui.py", line 6, in
show(example_df)
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pandasgui-0.1.14.1-py3.7.egg/pandasgui/gui.py", line 365, in show
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pandasgui-0.1.14.1-py3.7.egg/pandasgui/gui.py", line 76, in init
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pandasgui-0.1.14.1-py3.7.egg/pandasgui/gui.py", line 129, in setupUI
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pandasgui-0.1.14.1-py3.7.egg/pandasgui/widgets/find_toolbar.py", line 49, in init
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pkg_resources/init.py", line 1145, in resource_filename
self, resource_name
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pkg_resources/init.py", line 1744, in get_resource_filename
return self._extract_resource(manager, zip_path)
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pkg_resources/init.py", line 1765, in _extract_resource
timestamp, size = self._get_date_and_size(self.zipinfo[zip_path])
KeyError: 'pandasgui/widgets/../images/case-match.png'
How about releasing pandasgui on conda-forge? This might help to resolve the current installation/import issues. Here are their instructions how to contribute packages: https://conda-forge.org/docs/maintainer/adding_pkgs.html
I have some experience with that and could release it there.
Would like to be able to do this:
fig = px.scatter(df, x="strike", y="vol_mid", color="call_put", error_y="vol_bidask")
Thx
Python 3.7.4
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pandasgui/gui.py", line 192, in make_menu_bar
styleGroup = QtWidgets.QActionGroup(styleMenu, exclusive=True)
TypeError: 'exclusive' is an unknown keyword argument
I have installed the latest version today. I get the following error when running show(lib_1_3_df)
with a pandas DataFrame:
Using existing QApplication instance
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-b463f0b55e1e> in <module>
----> 1 show(lib_1_3_df)
~/anaconda3/lib/python3.7/site-packages/pandasgui/gui.py in show(block, *args, **kwargs)
362 kwargs = {**kwargs, **dataframes}
363
--> 364 pandas_gui = PandasGUI(**kwargs)
365
366 if block:
~/anaconda3/lib/python3.7/site-packages/pandasgui/gui.py in __init__(self, **kwargs)
74
75 # Generates all UI contents
---> 76 self.setupUI()
77
78 # %% Window settings
~/anaconda3/lib/python3.7/site-packages/pandasgui/gui.py in setupUI(self)
131
132 # QMainWindow setup
--> 133 self.make_menu_bar()
134 self.setCentralWidget(self.splitter)
135
~/anaconda3/lib/python3.7/site-packages/pandasgui/gui.py in make_menu_bar(self)
190
191 styleMenu = menubar.addMenu('&Set Style')
--> 192 styleGroup = QtWidgets.QActionGroup(styleMenu, exclusive=True)
193
194 # Add an option to the menu for each GUI style that exist for the user's system
TypeError: 'exclusive' is an unknown keyword argument
When trying to plot a dataframe on Mac (python 3.8, latest pandasgui from this repository), I am getting an error saying webgl is not available. I checked all browsers I have and they all support webgl (meaning when I go to the webgl site, I can see the graph - it is possible this is webgl2 not 1).
The dataset I used is here:
https://drive.google.com/file/d/1qlUt1_X_0BxbmFDP5YgAqIQBp3osP4jz/view?usp=sharing
When trying to install pandasgui, I'm having this problem:
Result from my notebook below:
!pip install pandasgui:
Collecting pandasgui Using cached pandasgui-0.2.5.1.tar.gz (83 kB) Requirement already satisfied: pandas in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (1.1.3) Requirement already satisfied: PyQt5 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (5.15.1) Requirement already satisfied: PyQtWebEngine in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (5.15.1) Requirement already satisfied: plotly in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (4.11.0) Requirement already satisfied: setuptools in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (41.2.0) Requirement already satisfied: appdirs in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (1.4.4) Requirement already satisfied: dacite in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (1.5.1) Requirement already satisfied: pynput in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (1.7.1) Requirement already satisfied: IPython in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandasgui) (7.18.1) Requirement already satisfied: pytz>=2017.2 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandas->pandasgui) (2020.1) Requirement already satisfied: numpy>=1.15.4 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandas->pandasgui) (1.19.2) Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from pandas->pandasgui) (2.8.1) Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from PyQt5->pandasgui) (12.8.1) Requirement already satisfied: six in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from plotly->pandasgui) (1.15.0) Requirement already satisfied: retrying>=1.3.3 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from plotly->pandasgui) (1.3.3) Requirement already satisfied: pygments in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (2.7.1) Requirement already satisfied: pickleshare in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (0.7.5) Requirement already satisfied: backcall in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (0.2.0) Requirement already satisfied: decorator in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (4.4.2) Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (3.0.8) Requirement already satisfied: colorama; sys_platform == "win32" in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (0.4.4) Requirement already satisfied: jedi>=0.10 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (0.17.2) Requirement already satisfied: traitlets>=4.2 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from IPython->pandasgui) (5.0.5) Requirement already satisfied: wcwidth in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->IPython->pandasgui) (0.2.5) Requirement already satisfied: parso<0.8.0,>=0.7.0 in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from jedi>=0.10->IPython->pandasgui) (0.7.1) Requirement already satisfied: ipython-genutils in c:\users\halissonsg\documents\python scripts\pandasgui\lib\site-packages (from traitlets>=4.2->IPython->pandasgui) (0.2.0) Using legacy 'setup.py install' for pandasgui, since package 'wheel' is not installed. Installing collected packages: pandasgui Running setup.py install for pandasgui: started Running setup.py install for pandasgui: finished with status 'done' Successfully installed pandasgui-0.2.5.1
!pip freeze:
appdirs==1.4.4 backcall==0.2.0 colorama==0.4.4 dacite==1.5.1 decorator==4.4.2 ipython==7.18.1 ipython-genutils==0.2.0 jedi==0.17.2 numpy==1.19.2 pandas==1.1.3 pandasgui==0.2.5.1 parso==0.7.1 pickleshare==0.7.5 plotly==4.11.0 prompt-toolkit==3.0.8 Pygments==2.7.1 pynput==1.7.1 PyQt5==5.15.1 PyQt5-sip==12.8.1 PyQtWebEngine==5.15.1 python-dateutil==2.8.1 pytz==2020.1 retrying==1.3.3 six==1.15.0 traitlets==5.0.5 wcwidth==0.2.5
import pandas as pd
from pandasgui import show:
`---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
in
1 import pandas as pd
----> 2 from pandasgui import show
ModuleNotFoundError: No module named 'pandasgui'`
I'm using Windows 10
When trying the simple tutorial you have, I get the following error:
import pandas as pd
from pandasgui import show
example_df = pd.DataFrame(pd.np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
columns=['a', 'b', 'c'])
show(example_df)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-11-449d53287c14> in <module>
1 import pandas as pd
----> 2 from pandasgui import show
3
4 example_df = pd.DataFrame(pd.np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),
5 columns=['a', 'b', 'c'])
~\AppData\Roaming\Python\Python37\site-packages\pandasgui\__init__.py in <module>
----> 1 from pandasgui.gui import show
2
3 __all__ = ['show']
~\AppData\Roaming\Python\Python37\site-packages\pandasgui\gui.py in <module>
6 import pkg_resources
7 import pandas as pd
----> 8 from PyQt5 import QtCore, QtGui, QtWidgets
9 from PyQt5.QtCore import Qt
10 from pandasgui.widgets import PivotDialog, ScatterDialog
ModuleNotFoundError: No module named 'PyQt5.sip'
I have this module installed as far as I can see:
(base) C:\Users\seanc>pip install pyqt5-sip
Requirement already satisfied: pyqt5-sip in c:\users\seanc\anaconda3\lib\site-packages (4.19.19)
Edit- Closing this thread since the number of feature requests from users other than myself has grown pretty large so going forward let's track each one in a new issue. If you have any feature request that doesn't have an open issue already please create one
I'll be working on the list below still but not adding to it anymore. if you see something listed that you really want implemented or needs more discussion feel free to open an issue if it doesn't have one.
Planned Enhancements
Done
Will not add
I noticed that you're looking for feedback... and I think this project is on to something...
My dream DataFrame viewer would work like this:
from pandasgui import DataFrameViewer
viewer = DataFrameViewer()
viewer.open() # opens a GUI window
viewer.bind(df1) # tab 1 in the viewer
viewer.bind(df2) # tab 2 in the viewer
viewer.bind(df3) # tab 3 in the viewer
Now when you change a cell value in the GUI, the application "pushes" the code to the python/ipython shell i.e., you see df1.at['row', 'col'] = 10
in the shell.
Moreover, if you type df1.at['row', 'col'] = 20
in the shell, the value automatically changes in the GUI. I think such an application would be 1000+ Github stars in no time.
I love this project. I can see myself using it constantly. It really fits a niche of working between spreadsheet and notebook. I actually think you could charge for this when it's mature.
Running miniconda python on OSX Cataline, and when trying to plot, the variables won't drag over. Let me know the best way to communicate my system state, and I can give you what you need.
Here's my setup.
λ which python
/Users/rob/miniconda/envs/viz/bin/python
•_simbiz•[mac_pro][19:17:04]( master )[ ~/rob/repos/sales_ops ]
λ python --version
Python 3.6.8 :: Anaconda, Inc.
•_simbiz•[mac_pro][19:17:08]( master )[ ~/rob/repos/sales_ops ]
λ pip freeze | grep gui
pandasgui==0.2.4.3
λ pip freeze | grep -i pyqt
PyQt5==5.15.1
PyQt5-sip==12.8.1
PyQtWebEngine==5.15.1
Hello there.
I tried running the example code. When it runs, the pandasGUI opens and closes immediately.
I don't have much to add unfortunately.
import pandas as pd
from pandasgui import show
df = pd.DataFrame(([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c'])
show(df)
Packages used :
pandasgui 0.2.5.1
pandas 1.1.3
pip 20.2.4
python 3.8.6 x64
Pycharm 2020.2.1
Windows 10
Hi, thanks for your awesome work. I love it
I didn't use every features of pandasgui
yet. but i'll try.
And maybe I expect myself to write very basic tutorial for my students.
but there's few suggestion for this project.
Here are my environments
python
version 3.8.3pandasgui
version 0.2.7pandas
version 1.1.2thanks again.
Below is the full error after running jupyter lab
in a .ipynb notebook file in Ubuntu 20.04
import pandas as pd
from pandasgui import show
df = pd.DataFrame(([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c'])
show(df)
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-dddd71cba70e> in <module>
1 import pandas as pd
----> 2 from pandasgui import show
3 from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
4 app = QtWidgets.QApplication([])
5 df = pd.DataFrame(([[1, 2, 3], [4, 5, 6], [7, 8, 9]]), columns=['a', 'b', 'c'])
~/.local/lib/python3.8/site-packages/pandasgui/__init__.py in <module>
----> 1 from pandasgui.gui import show
2
3 __all__ = ["show"]
~/.local/lib/python3.8/site-packages/pandasgui/gui.py in <module>
10 from PyQt5.QtCore import Qt
11
---> 12 from pandasgui.store import Store, PandasGuiDataFrame
13 from pandasgui.utility import fix_ipython, fix_pyqt, get_logger, as_dict, delete_datasets
14 from pandasgui.widgets.dataframe_explorer import DataFrameExplorer
~/.local/lib/python3.8/site-packages/pandasgui/store.py in <module>
3 import pandas as pd
4 from pandas import DataFrame
----> 5 from PyQt5 import QtCore, QtGui, QtWidgets, sip
6 from PyQt5.QtCore import Qt
7 import traceback
ImportError: cannot import name 'sip' from 'PyQt5' (/usr/lib/python3/dist-packages/PyQt5/__init__.py)
from PyQt5 import QtWebEngineWidgets
ImportError: cannot import name 'QtWebEngineWidgets' from 'PyQt5'
Hello,
I have a use case in mind that I think pandasgui
might be a good fit for. Is there a way to make the grid cells immutable? I'm looking to pull in tables from a DB, and bad things will inevitably happen if folks can manipulate the data presented in the GUI before copying.
Thanks.
self.parent.auto_size_column(header_index) AttributeError: 'builtin_function_or_method' object has no attribute 'auto_size_column'
self.parent.dataView.setColumnWidth( AttributeError: 'builtin_function_or_method' object has no attribute 'dataView'
Python 3.7.5
Install from github.
$python demo.py
Traceback (most recent call last):
File "demo.py", line 2, in
from pandasgui import show
File "/home/steph/Projects/pandasgui/pandasgui/init.py", line 1, in
from pandasgui.gui import show
File "/home/steph/Projects/pandasgui/pandasgui/gui.py", line 10, in
from pandasgui.widgets import PivotDialog, ScatterDialog
File "/home/steph/Projects/pandasgui/pandasgui/widgets/init.py", line 8, in
from pandasgui.widgets.plotly_viewer import PlotlyViewer
File "/home/steph/Projects/pandasgui/pandasgui/widgets/plotly_viewer.py", line 5, in
import plotly
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/plotly/init.py", line 30, in
from plotly import (
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/plotly/graph_objs/init.py", line 98268, in
import ipywidgets
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/ipywidgets/init.py", line 23, in
from IPython import get_ipython
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/init.py", line 55, in
from .core.application import Application
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/core/application.py", line 25, in
from IPython.core import release, crashhandler
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/core/crashhandler.py", line 27, in
from IPython.core import ultratb
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/core/ultratb.py", line 119, in
from IPython.utils import path as util_path
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/utils/path.py", line 17, in
from IPython.utils.process import system
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/utils/process.py", line 19, in
from ._process_posix import system, getoutput, arg_split, check_pid
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/IPython/utils/_process_posix.py", line 23, in
import pexpect
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pexpect/init.py", line 75, in
from .pty_spawn import spawn, spawnu
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pexpect/pty_spawn.py", line 14, in
from .spawnbase import SpawnBase
File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/pexpect/spawnbase.py", line 224
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax
Resizing columns is not possible which is a necessary feature for viewing dataframes.
When showing a DataFrame with a MultiIndex the index columns in the gui are all labeled None even though the index labels have names.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.