Comments (10)
Hey @mwouts !
Thanks! :)
Let's put our heads together :).
I totally get your idea. In fact, I share that ideology and I wrote Jupyter DataTables with that in mind as well (see further). Having a single environment-agnostic component that could be used to display the data would be wicked! :)
However, from what I've seen, you've been experimenting and investing your time in Jupyter Notebooks at the moment and basically re-implementing stuff that is already there in the jupyter-datatables package. Even the issues like #6 and #8 have already been solved there.
Don't get me wrong, I am not saying that because I want to promote the jupyter-datatables --- of course, I want, who wouldn't want contributors :) --- I am saying that because I know how much time I spent solving all of the problems around it.
To address your goals: Jupyter DataTables are basically pure JS, so that shouldn't be the problem when it comes to porting that to Jupyter Lab. What's holding it back is the custom JavaScript executor that I wrote for Jupyter Notebooks which takes care of the most aspects of Python-JS communication and is therefore an integral component: the jupyter-require package.
Once this is ported to JupyterLab, it should be a piece of cake to run DataTables there.
As far as Dash is concerned, I've never worked with it to that extent so that I could give an educated answer, but from what I understand, the components are written in React. Which means that it should be just a matter of wrapping the Jupyter DataTables into a React Component and passing in the data.
There is currently a gap IMHO in Jupyter Notebooks, which is the Python-JS communication and synchronous JS execution and that's what jupyter-require is trying to solve. To be honest I haven't invested my time in Jupyter Lab yet, so I am not sure how that works there. I'd appreciate your input on that very much. I would also be very glad if you took a look at jupyter-require and gave me your idea about the difficulty of porting that to Jupyter Lab extension. Once that is solved, we have 2/3 solved and Dash React component would be the next in the queue.
Looking forward to your inputs! :)
Cheers,
Marek
from itables.
Thanks for pushing on this @mwouts!
I don't have time now to go into this deeply, but something to be aware of is that this is also possible with vuetify / ipyvuetify:
And we've used that in glue-jupyter to make a very custom table:
glue-viz/glue-jupyter#129
Which also works with a vaex dataframe (kernel side processing, 1 billion rows).
Hopefully that adds to the inspiration as well :)
from itables.
Personally, I chose to use itables over jupyter-datatables for the Advanced cell formatting / HTML in cells features. See https://uoa-eresearch.github.io/twitter_analysis/plot.html for an example of how I used these.
from itables.
@maartenbreddels, thanks for the screenshot, that's fairly impressive! I'll give a try to ipyvuetify, and see how it works. Would you have a sample notebook to reproduce that example (or a simpler table?)
The mybinder link: https://mybinder.org/v2/gh/mariobuikhuizen/ipyvuetify/master?filepath=examples%2FExamples%20template.ipynb
Personally I think Vue is a really good framework for people that don't want to do heavy frontend development like React, but aren't afraid of a little bit of html-like syntax, and sprinkle a bit of JS in the mix.
Embracing Vue, Vuetify seem like one of the best component frameworks, where it's v-data-table component is not an opinionated component, but something to make your custom table viewer with. It supports client and server pagination/sorting/searching etc, and integrates well with vuetify.
Via ipyvuetify it's easy to expose them as a widget for Python (via the template system shown in the binder link).
from itables.
Awesome! I love what you show there. When time permits I'll see if I can draft a version of itables
based on ipyvuetify
!
from itables.
Hello @CermakM , I'm glad to see you here! Let me also mention that from the beginning your work on jupyter-datables ranked high in the project references.
Maybe I should tell you a bit more about the purpose of this project. I'd love to be able to use a robust table component for both Jupyter and Dash (and possibly also PyCharm/VScode). I think that the DT package in R is inspiring: the same package can be used in notebooks, in the IDE, and in Shiny applications.
I am afraid we are very far from that in the Python world:
- In Jupyter notebook I can use
qgrid
. But it won't display nicely all my tables, and also I really prefer to typedf
thanshow_grid(df)
. - In Jupyter Lab I can use
ipysheet
by @maartenbreddels and @martinRenou - or maybe, I was an expert of
ag-grid
then I could useipyaggrid
by @DGothrek. - In Dash I can use dash-datatable by @chriddyp, @alinastarkov, @Marc-Andre-Rivet, and others.
But clearly that's far from my ideal - I don't really want to learn using more than one table framework, and I want to do at least both Dash apps and notebooks with the same table.
What I'd love to trigger (rather than implementing here - itables
is more a proof of concept than a real project), is to encourage someone/or a group with the necessary skils to propose a package that would
- be robust - it could ideally display tables of any shape or content (I'm ok with only showing an extract of large tables)
- be easy to use - default options should be good enough
- could be fined tuned by advanced users - as you may have seen, I like the idea of applying extracts of the javascript documentation to the Python package.
Let me know what you think. Also, @chriddyp, I'd love to ear what the Dash team thinks of allowing Jupyter users to use their table component in a notebook (I know that I can use plotly tables, and I also know that I can launch Dash app in Jupyter Lab, but what I really want here is a real table component in a notebook).
from itables.
That is actually pretty neat! Thanks for the pointer @maartenbreddels
from itables.
Hello @CermakM , @maartenbreddels , thanks for your inputs!
I liked the idea behind the jupyter-require package, and also your readme there, that's very interesting, and the d3 example is fun! But maybe that is still in an early stage, and probably I would prefer to adopt a technology that has the potential to deliver the table to any of Jupyter Notebook, Lab, Jupyter NBconvert, and Dash. Plotly have a great expertise on this, since they deliver Plotly javascript plots in all of these environments, and thus I think we should have a look at how they do that.
@maartenbreddels, thanks for the screenshot, that's fairly impressive! I'll give a try to ipyvuetify, and see how it works. Would you have a sample notebook to reproduce that example (or a simpler table?)
Regarding the next steps, this is what I am thinking of:
- a review of the existing table framework (tables available in Jupyter). Recap the features in a summary table: do they work in Jupyter Notebook/Lab/NBconvert/Dash, offline, do they support inputs of any types, do they display nicely tables with many rows/columns/multiindices, do they implement a server mode for large tables, can we edit the table,... If you like the idea, I can share a notebook with a series of test, and we could run it on the candidate table frameworks.
- a reflexion on how to best connect the table component with Jupyter. Probably ipywidgets is the way to go? What are the limitations? Why does Plotly uses another solution?
- Can we offer a table framework in Jupyter that will be usable by people who know nothing about the underlying JS table component? Can we offer a full mapping of JS options for those who are expert of the JS components? Without giving the impression that you need to be an expert to use the Python component?
Let me know what you think!
from itables.
Oh that's interesting! Thank you @neon-ninja for the link. May I ask if you had any previous experience with datatables.net? Was it easy to find that in the documentation?
from itables.
Yes, I used it directly for a leaflet js project a few years ago. Yes, your example / links were very helpful :)
from itables.
Related Issues (20)
- Download CSV and Excel HOT 2
- Tables in a Streamlit app have a fixed height that does not work well with lengthMenu or search extensions
- Deploy a sample Shiny app that uses ITables HOT 1
- New landing page for conda forge `itables` HOT 4
- Support for the cell range copy to excel HOT 8
- sorry wrong post.. plase delete
- SearchBuilder & Checkboxes HOT 4
- UnicodeDecodeError while set "connected=False" HOT 5
- SearchBuilder Requires DateTime when used with dates. HOT 7
- Support for Polars Struct HOT 2
- Inf loading tables for particular `polars` data frame HOT 10
- Changing the color of buttons in searchBuilder HOT 7
- column_filters does not seem to be working when displaying Pandas Styler object HOT 1
- SearchBuilder picks up   as column name for Pandas styler object but works fine for Pandas dataframe object HOT 2
- Is there a way to make colvis button work without reset_index() HOT 2
- `OverflowError: can't convert negative int to unsigned` HOT 2
- Overflow-x not working properly within an ipywidget.Output widget HOT 5
- [question] Downsampling config options HOT 3
- Missing `conneted=False` and `dt_bundle` support in `to_html_datatable` HOT 4
- issue with conversion of notebook to pdf HOT 2
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 itables.