llama90 commented on issue #43164:
URL: https://github.com/apache/arrow/issues/43164#issuecomment-2217799004
I raised this question because I wanted to resolve some S3 issues. I
executed the PyArrow code, and it worked well. I am trying to resolve the
issues with PyArrow through testing.
```python
import pyarrow as pa
import pyarrow.parquet as pq
import pyarrow.fs as fs
s3 = fs.S3FileSystem(region='ap-northeast-2')
data = {
'name': ['Alice', 'Bob', 'Charlie', 'David'],
'age': [24, 27, 22, 32]
}
table = pa.table(data)
bucket = 'bucket_name'
file_path = f'{bucket}/prefix/example.parquet'
with s3.open_output_stream(file_path) as f:
pq.write_table(table, f)
print(f"Data written to {file_path}")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]