Comments (6)
The point is that other dataframe display methods (e.g. to_html()) accept a parameter (index=False) which hides the index column in the resulting html (which you can then render in the notebook using display()). It would be good if qgrid allowed a similar parameter to suppress the index display.
from qgrid.
You can do this:
q = qgrid.show_grid(mydf, column_definitions={ 'index': { 'maxWidth': 0, 'minWidth': 0, 'width': 0 } })
I wish this was a qgrid level option do I didn't have all that on my display, but this DOES work.
from qgrid.
Sorry I don't believe there is a way to do this currently. You'll have to remove the column from the DataFrame if you don't want it to appear in the grid. This would be a nice convenience feature to add though, so thanks for filing the issue.
from qgrid.
Thanks. Is there a way to remove it from the DataFrame? If I understand correctly the row name qgrid column is not a DataFrame column.
from qgrid.
I may have misunderstood the question. Can you look at the sample notebook here and tell me if either of the examples there have the problem you're talking about? http://nbviewer.jupyter.org/gist/TimShawver/b4bc80d1128407c56c9a
I'm guessing the second example might be what you're talking about, i.e. how a numbered "index" column appears when your DataFrame is lacking an index. You'll notice that the column is also in the default rendering of the DataFrame though, so it's the correct behavior by Qgrid. It's impossible to have a DataFrame without an index, so when you don't specify one yourself, pandas adds one for you.
It might be that the workaround for your specific issue would be to use one of the existing columns in the DataFrame as the index. This stackoverflow article shows how to set the index of your DataFrame to an existing column.
from qgrid.
q = qgrid.show_grid(mydf, column_definitions={ 'index': { 'maxWidth': 0, 'minWidth': 0, 'width': 0 } })
This still shows a few pixels from the column
from qgrid.
Related Issues (20)
- add_row function breaks when using a numeric index
- grid does not support add_rows on an empty dataframe. Could we stop the user from removing the last row?
- qgrid incompatible with ipywidgets==8.0.0a6 due to decorator usage HOT 1
- Qgrid working with Modern Jupyter Lab (3.2 and beyond)
- Set Formatter for Column Definitions
- AttributeError: 'DataFrame' object has no attribute 'map'
- [Security] Workflow main.yml is using vulnerable action actions/checkout
- missing 1 required positional argument: 'widget' HOT 3
- qgrid not working in Binder notebook
- update for ipywidgets 8 compatibility HOT 1
- qgrid post link fails on environment build HOT 2
- REPO IS NO LONGER MAINTAINED AND DOES NOT SUPPORT JUPYTERLAB>=3.0.0 HOT 8
- QGrid is not working with NB-viewer.
- Internet connection required for qgrid 1.1.3 HOT 1
- Here, working version HOT 12
- filter_changed is not recognised in .on() HOT 1
- "ImportError: cannot import name 'Mapping' from 'collections' (C:\ProgramData\anaconda3\lib\collections\__init__.py)"
- post-link script failed for package conda-forge::qgrid-1.3.1-py39hcbf5309_2
- Filter not working HOT 1
- Detecting row selected in Python shiny
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 qgrid.