-
Notifications
You must be signed in to change notification settings - Fork 140
[Enh]: Support a more general set of arrays from pyarrow #2237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
thanks @matthewwardrop for the report!
could you give an example please? that doesn't sound intentional
I just think of it as the "Series" equivalent to |
Hi @MarcoGorelli ! I don't have a full reproducer yet, I'm afraid. But I had some code that looked like:
And |
thanks - is this still the case on the latest Narwhals version? i remember we did have an issue related to this some time ago but it should have been fixed |
Hi again @MarcoGorelli , I tested on the latest version of narwhals (1.31) and can confirm that the following code still outputs
When I tried to then import this back through the system via |
Yeah... the |
ah yes, I'd suggest either using |
Is it reasonable, per the original topic, to have narwhals upcast for the user? Or is that out of scope for the |
For more context, this is related to the alignment of namespaces I posted in a previous issue (#2193). I want to be able to cast values of one type to another. Typically that means doing: |
thanks for explaining I think this is out-of-scope for Would that work for you / make things any easier? |
This comment has been minimized.
This comment has been minimized.
nice, thanks we could just be one step ahead of Polars and immediately return |
Hi @MarcoGorelli ! It definitely seems like a good idea to avoid unnecessary rechunking. Adding the option or waiting until something similar lands upstream seems somewhat reasonable. It's a bit of a surprise that dropping the chunking is the default behaviour :). Thanks for your prompt responses (and apologies for the delays in my own!). |
Please describe the purpose of the new feature or describe the problem to solve.
Currently,
*.from_native
support pyarrow chunked arrays, and no other pyarrow array types. But narwhals operations on pyarrow tables sometimes result in arrays of typepyarrow.StringArray
or other high-levelArray
types. I made one small changed in the pyarrow ingestion code to allow for instances ofpyarrow.Array
instead ofChunkedArray
and everything worked fine. Is there are reason that you restricted things toChunkedArray
?Suggest a solution if possible.
Be a bit more leniant during pyarrow series ingestion.
Tracking
The text was updated successfully, but these errors were encountered: