Skip to content
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

fix - cannot encode value Binary to term #995

Conversation

ceyhunkerti
Copy link
Contributor

@ceyhunkerti ceyhunkerti commented Sep 26, 2024

fixes #994

import polars as pl
df = pl.DataFrame({"image": [b'\x01\x02\x03']})
df.write_parquet("ok.parquet")
df = pl.DataFrame({"image": [{"bytes": b'\x01\x02\x03'}]})
df.write_parquet("bad.parquet")
iex(1)> Explorer.DataFrame.from_parquet!("bad.parquet")
#Explorer.DataFrame<
  Polars[1 x 1]
  image struct[1] [%{"bytes" => [1, 2, 3]}]
>

@josevalim
Copy link
Member

Looks great! Can you please add a test as well? :) You should be able to write the parquet file using a binary series.

@philss
Copy link
Member

philss commented Sep 26, 2024

Thanks for the PR, @ceyhunkerti! I made a fix for that in #996 returning the binary series , so I'm closing this one.

@philss philss closed this Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot encode value Binary to term (when Binary is nested in struct)
3 participants