[ 
https://issues.apache.org/jira/browse/ARROW-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913308#comment-16913308
 ] 

Joris Van den Bossche commented on ARROW-2572:
----------------------------------------------

Given that Columns no longer exist, I think this can be closed.

If you have defined fields (eg to add custom metadata), you can pass them in a 
schema to create the table:

{code}
field1 = pa.field('field1', pa.int64(), metadata=dict(a="A", b="B")) 
field2 = pa.field('field2', pa.int64(), nullable=False)

table = pa.Table.from_arrays([pa.array([1, 2]), pa.array([3, 4])], 
schema=pa.schema([field1, field2]))
{code}



> [Python] Add factory function to create a Table from Columns and Schema.
> ------------------------------------------------------------------------
>
>                 Key: ARROW-2572
>                 URL: https://issues.apache.org/jira/browse/ARROW-2572
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Python
>    Affects Versions: 0.9.0
>            Reporter: Thomas Buhrmann
>            Priority: Minor
>              Labels: beginner, documentation
>             Fix For: 0.15.0
>
>
> At the moment it seems to be impossible in Python to add custom metadata to a 
> Table or Column. The closest I've come is to create a list of new Fields (by 
> "appending" metadata to existing Fields), and then creating a new Schema from 
> these Fields using the Schema factory function. But I can't see how to create 
> a new table from the existing Columns and my new Schema, which I understand 
> would be the way to do it in C++?
> Essentially, wrappers for the Table's Make(...) functions seem to be missing.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to