Skip to content

Consider patching polars.read_parquet to make it kind of work?#651

Description

@lesteve

First of all, thanks for allowing polars to be back as a Pyodide package 馃檹! ccing @fzumstein since he is the one who apparently did most of the work in https://github.com/xlwings/polars-pyodide/.

In a scikit-learn context, we have examples that can be run in JupyterLite using the pyodide kernel. We also need polars.read_parquet in external tutorials where it is convenient to have a JupyterLite setup so that attendees don't have to install anything. See this for more context about the scikit-learn use case.

I saw that you are getting polars from https://github.com/xlwings/polars-pyodide/ whose README.md says that parquet functionality is disabled because it relies on async functionality without an easy solution in sight.

I am wondering how doable this would be to patch polars.read_parquet to make it kind of work with the work-around suggested in pola-rs/polars#20876 (comment). The idea is to use pyfetch + pyarrow.parquet + polars.from_arrow. I guess you could also have a similar approach for a local file (don't use pyfetch I guess).

Not sure whether pyodide/pyodide-recipes or xlwings/polars-pyodide would be the best place to do the patch, I guess pyodide/pyodide-recipes seems more appropriate?

I am totally fine if you tell me this is a terrible idea, I thought I would open an issue and see what happens 馃槈.

I don't know much about polars, there may be more functionality in polars.read_parquet that this simple work-around can not handle, but it seems like it could be useful still.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions