You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Alenka Frim (Jira)" <ji...@apache.org> on 2022/07/12 06:38:00 UTC

[jira] [Commented] (ARROW-17047) [Python][Docs] Document how to get field from StructType

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

Alenka Frim commented on ARROW-17047:
-------------------------------------

I agree and would encourage this and hopefully some other examples to go under the docstring improvement work.

Right now I am working on FIlesystems, see https://issues.apache.org/jira/browse/ARROW-16091, and am planning to schedule additional topics when I finish it. Type Classes would be a good starting point.

I created an umbrella issue: https://issues.apache.org/jira/browse/ARROW-17048.

Feel free to add examples there!

> [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: Improvement
>          Components: Documentation
>    Affects Versions: 8.0.0
>            Reporter: Will Jones
>            Priority: Major
>
> 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)