Comments (20)
BTW... I was COMPLETELY shocked by the change in the Grapher layout. I was like "I must have broken something". Once I figured how it works, it's clearly an improvement.
from pandasgui.
Pls ignore "render_mode", I was trying that out to see if it did anything.
from pandasgui.
Hi @miglto
Let's check if your problem is related to pandasgui
or just plotly
. Can you run the code below and let me know what happens?
import pandas as pd
import plotly.express as px
df = pd.read_csv('https://drive.google.com/u/0/uc?id=1qlUt1_X_0BxbmFDP5YgAqIQBp3osP4jz')
fig = px.scatter(data_frame=df, x='bid', y='ask')
fig.show(renderer="browser")
It should open a Plotly figure in your browser that looks like mine above
from pandasgui.
from pandasgui.
Yeah pandasgui
uses the QWebEngineView
from PyQt
.
Can you try this code now?
from PyQt5 import QtCore, QtWidgets
from PyQt5.QtWebEngineWidgets import QWebEngineView
import tempfile
import pandas as pd
import plotly.express as px
from plotly.io import to_html
df = pd.read_csv('https://drive.google.com/u/0/uc?id=1qlUt1_X_0BxbmFDP5YgAqIQBp3osP4jz')
fig = px.scatter(data_frame=df, x='bid', y='ask')
app = QtWidgets.QApplication.instance() or QtWidgets.QApplication([])
file = tempfile.NamedTemporaryFile(mode="w", suffix=".html", delete=False)
file.write(to_html(fig, config={"responsive": True}))
viewer = QWebEngineView()
viewer.load(QtCore.QUrl.fromLocalFile(file.name))
viewer.show()
app.exec_()
from pandasgui.
from pandasgui.
Simple example that fails below - this is a QtWebEngine issue... Who to ask?
from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
app = QtWidgets.QApplication.instance() or QtWidgets.QApplication([])
viewer = QtWebEngineWidgets.QWebEngineView()
viewer.load(QtCore.QUrl("http://webglreport.com/?v=2"))
viewer.show()
app.exec_()
from pandasgui.
from pandasgui.
Yep looks like a QWebEngineView
issue. I found a few potential fixes... try the snippet below. And if it doesn't work, also try upgrading PyQt5
and PyQtWebEngine
to latest versions or at least 5.13.0
from PyQt5 import QtCore, QtWidgets, QtWebEngineWidgets
app = QtWidgets.QApplication(["--ignore-gpu-blacklist", "--enable-gpu-rasterization"])
viewer = QtWebEngineWidgets.QWebEngineView()
viewer.settings().setAttribute(QtWebEngineWidgets.QWebEngineSettings.WebGLEnabled, True)
viewer.load(QtCore.QUrl("http://webglreport.com/?v=2"))
viewer.show()
app.exec_()
Who to ask?
If none of the above works, try also posting on https://stackoverflow.com/ with the pyqt
and pyqt5
tags.
Also include what OS version you're using and your version of PyQt5
and PyQtWebEngine
from pandasgui.
from pandasgui.
PyQt5 and PyQtWebEngine are versions 5.15.0 (latest)
OS is macOSX 10.15.6
Laptop is MacBookPro11,1 (GPU is Inter Iris)
from pandasgui.
I installed Ubuntu 20.04 on my mac, and the webgl error is gone. I am guessing this is macos blocking a call to webgl. It is odd that it would do that but it works in Safari, Chrome, and Firefox.
from pandasgui.
Yeah unfortunately I can't be much help debugging since I can't reproduce the issue myself (don't have a Mac), but if you do end up finding a solution I'll add the fix to pandasgui
from pandasgui.
Yes, I will let you know if I find a solution. However, frankly now that I got my mac to triple-boot (macos, ubuntu, windows) I will probably not bother with macos for this any longer... :)
BTW... Quick question: Would it be possible/useful to add a filter to pandasgui? Meaning for example selecting rows based on some value of the row. Obviously this can be done in code, but that's a tad slower. Thx!
from pandasgui.
BTW... Quick question: Would it be possible/useful to add a filter to pandasgui? Meaning for example selecting rows based on some value of the row. Obviously this can be done in code, but that's a tad slower. Thx!
Yup I'll probably focus on that now since I'm mostly done the Grapher. If you have any ideas about how it should look & work feel free to post.
I'll probably start off by just providing a text input on each DataFrame that lets you enter strings as a Pandas query expression, and allow you to toggle them on/off.
Also considered a button on each header that pops up a UI like this, but its more work and not that much better so I'll put it off for someone else to do or until I have more time
from pandasgui.
That's cool.
A few comments:
- You really want to indicate what columns have filters applied, maybe making the header red or something (otherwise it is easy to overlook)
- For values, I often care that they are in a range, so maybe that's something consider (an and would do)
- In other tabs (eg stats and grapher) I would also add an indication that some filtering had been applied - like a red dot or a message.
from pandasgui.
Closing this since you moved on and I was unable to replicate it.
btw I just pushed what I've done so far on the filters feature to the dev branch if you want to try it out.
You really want to indicate what columns have filters applied, maybe making the header red or something (otherwise it is easy to overlook)
Decided against this because filters can reference multiple or modified columns. It's still easy to see what filters are applied by looking at the Filters tab.
For values, I often care that they are in a range, so maybe that's something consider (an and would do)
Example of this is in my pic for both ranges and value lists.
In other tabs (eg stats and grapher) I would also add an indication that some filtering had been applied - like a red dot or a message.
I like this idea but haven't done anything on it yet. Right now Statistics remain unfiltered and Grapher works on the currently filtered DataFrame
If you have any more feedback or suggestions on filtering or other topics please open a new issue so it doesn't get lost
from pandasgui.
ftr, I have the same issue in Ubuntu 18.04
from pandasgui.
ftr, I have the same issue in Ubuntu 18.04
I recommend trying the same snippet as miglto:
from PyQt5 import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
app = QtWidgets.QApplication.instance() or QtWidgets.QApplication([])
viewer = QtWebEngineWidgets.QWebEngineView()
viewer.load(QtCore.QUrl("http://webglreport.com/?v=2"))
viewer.show()
app.exec_()
And that will narrow it down to a PyQt5 issue, and then I recommend opening a thread here https://forum.qt.io/category/10/general-and-desktop
If someone has a solution that can be solved with code let me know and I'll put it in PandasGUI.
from pandasgui.
For me it turned out to be an issue with PyCharm. It works nicely from the ipython commandline.
from pandasgui.
Related Issues (20)
- toggle widgets on demand
- Can't add multiple variables when doing a pivot
- Image html PIL support.
- Get error: module 'bokeh.plotting' has no attribute 'Figure' HOT 3
- PandasGUI not Opening in Jupyter Notebook
- Filter Export/Import Option
- Mass Edit
- cannot import pandasgui on M1 mac
- PyQtWebEngine fail to install blocking pandasgui HOT 1
- Opacity for Scatter-Plot Markers?
- The pandasgui installation failed HOT 1
- Allow any kind of file extension
- Show() Error --AttributeError: module 'bokeh.plotting' has no attribute 'Figure' HOT 1
- pip install pandasgui fails for py 3.12
- Filtering timestamp columns
- Get error: module 'bokeh' has no attribute '__version'
- Dark Mode HOT 1
- FutureWarning
- conda-forge support for latest version
- Pass a set of Filters to be displayed for use in checkbox window when GUI Launches HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pandasgui.