We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thank you for your work on this excellent project.
Python
0.7.16
OS X 10.14.3
When using pl.from_arrow on python tables with utf8() columns, something is happening that doesn't respect existing slices of arrays.
pl.from_arrow
import pyarrow as pa import polars as pl letters = pa.array(["A", "B", "C"]) tab = pa.table({ 'leading': letters[:-1], 'lagging': letters[1:] }) pl.from_arrow(tab)
Gives:
leading lagging str str "A" "A" "B" "B"
While tab.to_pandas() gives, correctly
tab.to_pandas()
leading | lagging -- | -- | -- A | B B | C
The to_pandas() output is correct.
Note: this behavior does not appear if the pyarrow column is an integer rather a string, i.e. the following code works as expected.
import pyarrow as pa import numpy as np import polars as pl numbers = pa.array(np.arange(3)) tab = pa.table({ 'lagging': numbers[1:], 'leading': numbers[:-1] }) tab.to_pandas() pl.from_arrow(tab)
The text was updated successfully, but these errors were encountered:
Thanks for your issue report. I will look into it.
Sorry, something went wrong.
apache/arrow-rs#335
Is merged upstream
No branches or pull requests
Thank you for your work on this excellent project.
Are you using Python or Rust?
Python
What version of polars are you using?
0.7.16
What operating system are you using polars on?
OS X 10.14.3
Describe your bug.
When using
pl.from_arrow
on python tables with utf8() columns, something is happening that doesn't respect existing slices of arrays.What are the steps to reproduce the behavior?
Gives:
While
tab.to_pandas()
gives, correctlyleading | lagging
-- | -- | --
A | B
B | C
What is the expected behavior?
The to_pandas() output is correct.
Note: this behavior does not appear if the pyarrow column is an integer rather a string, i.e. the following code works as expected.
The text was updated successfully, but these errors were encountered: