Skip to content

Commit

Permalink
Add more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
amoeba committed Oct 23, 2024
1 parent e05e527 commit 91ac1eb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions python/pyarrow/types.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -5722,6 +5722,25 @@ def schema(fields, metadata=None):
some_int: int32
some_string: string
DataTypes can also be passed as strings. The following is equivalent to the
above example:
>>> pa.schema([
... pa.field('some_int', "int32"),
... pa.field('some_string', "string")
... ])
some_int: int32
some_string: string
Or more concisely:
>>> pa.schema([
... ('some_int', "int32"),
... ('some_string', "string")
... ])
some_int: int32
some_string: string
Returns
-------
schema : pyarrow.Schema
Expand Down

0 comments on commit 91ac1eb

Please sign in to comment.