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

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

I opened ARROW-17139 for the idea of actually adding a method for this.

> [Python][Docs] Document how to get field from StructType
> --------------------------------------------------------
>
>                 Key: ARROW-17047
>                 URL: https://issues.apache.org/jira/browse/ARROW-17047
>             Project: Apache Arrow
>          Issue Type: Sub-task
>          Components: Documentation
>    Affects Versions: 8.0.0
>            Reporter: Will Jones
>            Assignee: Anja Boskovic
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 9.0.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> It's not at all obvious how to get a particular field from a StructType from 
> it's API page:
> https://arrow.apache.org/docs/python/generated/pyarrow.StructType.html#pyarrow.StructType
> We should add an example:
> {code:python}
> struct_type = pa.struct({"x": pa.int32(), "y": pa.string()})
> struct_type[0]
> # pyarrow.Field<x: int32>
> pa.schema(list(struct_type))
> # x: int32
> # y: string
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to