Pandas Tutor: Using Pyodide to Teach Data Science at Scale
Pandas Tutor is a data science education tool that visualizes how pandas code transforms dataframes. In this guest post we discuss how we ported it to run 100% in-browser with Pyodide.
Pandas Tutor is a data science education tool that visualizes how pandas code transforms dataframes. In this guest post we discuss how we ported it to run 100% in-browser with Pyodide.
Pyodide 0.20 is a major release focused on improving our system for building and packaging Python modules. We upgraded to Python 3.10. This comes with a speed boost of around 15% in Firefox and 22% in Chrome. We updated almost every package to the most recent release, and moved closer to using upstream Emscripten. Pyodide 0.20 also includes many small bug fixes and usability improvements. For the complete list of changes see the changelog. ...
Pyodide is a distribution of CPython for WebAssembly which was started by Michael Droettboom at Mozilla. Today, Pyodide is an independent open source project. It not only provides support for calling JavaScript and web APIs from Python, but also brings the Python scientific stack to the browser as it includes the five most essential data science libraries – NumPy, Pandas, Matplotlib, scikit-learn, and Scipy. In this post, we present a new backend for Matplotlib enabling the rendering of figures in the browser by leveraging the <canvas> element. This showcases how JavaScript and Python can interact with each other, thanks to Pyodide. ...
From web servers to end-to-end Data pipelines, Python has become a ubiquitous tool for building all sorts of programs and software. With powerful built-in libraries and an incredible number of third-party libraries, the Python ecosystem makes it easy to quickly get your project started. In fact, building user interfaces (UIs) is not an exception: PyQT allows you to create cross-platform desktop applications, whereas libraries like Dash allows you to create full-fledged web applications (including the UI) within a single Python script. ...
Pyodide 0.19 is a major release focused on improving the build system, updating scientific computing packages, and improving the workflow for loading Python code. Here are a few highlights. For the complete list of changes see the changelog. Removal of function pointer cast emulation Some Python C extensions use function pointer casting, which is an unspecified behavior according to the C specification. However, all common native C compilers generate code that works fine. This is not the case with Emscripten when building for WebAssembly, which will fail on function pointer casts. As a workaround we have been using Emscripten’s -s EMULATE_FUNCTION_POINTER_CASTS flag, which emits code to emulate function pointer casts at runtime. This has significant overhead. ...
In the upcoming release of Pyodide version 0.19, we finally support the Python default recursion limit of 1000. We also attain a speed boost of somewhere between 10 and 20 percent. The code size was reduced by 25% from 12 megabytes to 9.1 megabytes. These gains came from this pull request which changed the way we handle function pointer casts. Here is a plot showing the improvements in recursion depth: Recursion limit and depth to segmentation fault Tested with Chrome version 96 and Firefox version 93 ...
We would like to announce that Pyodide is now a member of the Open Source Collective (OSC), which will act as the project’s fiscal host. The Pyodide project compiles Python and the scientific stack to WebAssembly using Emscripten. Pyodide was created in 2018 by Michael Droettboom at Mozilla as part of the Iodide project. Later in 2021 Pyodide became an independent open-source project, and the current announcement completes this transition. Pyodide is now able to receive donations and accept sponsorships though Open Source Collective, which should help long term project sustainability. We have looked at a few non-profit umbrella organizations before making this choice, and we quite like the financial transparency and ease of setup offered by OSC. In addition, since Pyodide use cases are wider than scientific computing, we felt that a non-specialized fiscal host would be best. ...