WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

Here is a good example of loading an Arrow from str. The ":obj:bytes|:obj:str" part of the API docs probably need to be cleared up a bit (along with formatting, it seems)—it does not refer to the ability to load arbitrary strings/bytes, but rather the ability to load CSVs as strings and Apache Arrow-formatted binaries in a byte format.

I am not super familiar with Parquet, but this is the code we use in our tests to convert an Apache Arrow Table to str:

stream = pa.BufferOutputStream()
arrow_table = pyarrow.Table.from_batches([batch])
writer = pyarrow.RecordBatchStreamWriter(stream, arrow_table.schema)
writer.write_table(arrow_table)
writer.close()
table = perspective.Table(stream.getvalue(…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@genderev
Comment options

Answer selected by genderev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1424 on May 19, 2021 01:37.