arrow-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Chu <xwei...@ucsc.edu>
Subject Re: PyArrow.Table schema.metadata issue
Date Thu, 28 Nov 2019 05:41:54 GMT
Dear all,

I need your help regarding the pyarrow.table.schema.

I tried to create a schema and use with_metadata/add_metadata functions to
add the metadata (a python dict) to the schema. However, nothing showed up
when I run 'schema.metadata'. I can't get the metadata added to the schema.

This issue can be easily reproduced on python2 and 3:

import pyarrow as pa
schema = pa.schema([pa.field('Event_ID', pa.int64())])
meta = {}
meta['test'] = 'testval'
schema.add_metadata(meta)
#schema.with_metadata(meta)
schema.metadata

Thanks for your help!!

Best Regards,
Aaron Chu


On Wed, Nov 27, 2019 at 9:37 PM Aaron Chu <xweichu@ucsc.edu> wrote:

> Dear all,
>
> I need your help regarding the pyarrow.table.schema.
>
> I tried to create a schema and use with_metadata/add_metadata functions to
> add the metadata (a python dict) to the schema. However, nothing showed up
> when I run 'schema.metadata'. I can't get the metadata added to the schema.
>
> This issue can be easily reproduced on python2 and 3:
>
> import pyarrow as pa
> schema = pa.schema([pa.field('Event_ID', pa.int64())])
> meta = {}
> meta['test'] = 'testval'
> schema.add_metadata(meta)
> #schema.with_metadata(meta)
> schema.metadata
>
> Thanks for your help!!
>
> Best Regards,
> Aaron Chu
>

Mime
View raw message