phpsxg commented on issue #35441:
URL: https://github.com/apache/arrow/issues/35441#issuecomment-1535794081

   > Seems default of nullable is true ( 
https://arrow.apache.org/docs/python/generated/pyarrow.field.html#pyarrow.field 
). What error does it report? And can you provide how to reproduce the error?
   
   ```
   import random
   
   import pandas as pd
   import pyarrow as pa
   import pyarrow.dataset as ds
   
   schema = pa.schema([
       pa.field('id', pa.string(), metadata={b"table_field": b"ID"}),
       pa.field('name', pa.string(), metadata={b"table_field": b"NAME"}),
       pa.field('age', pa.int8(), metadata={b"table_field": b"AGE"})
   
   ])
   data = {
       "id": [i for i in range(3)],
       "name": [None] * 3,
       "age": [random.randint(10, 30) for i in range(3)]
   }
   df = pd.DataFrame(data)
   print(df)
   
   table = pa.Table.from_pandas(df)
   file_path = 'test'
   ds.write_dataset(table, file_path, format='parquet', schema=schema)
   ```


-- 
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]

Reply via email to