Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions python/pyarrow/_compute.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2895,8 +2895,9 @@ cdef class Expression(_Weakrefable):
----------
type : DataType, default None
Type to cast array to.
safe : boolean, default True
Whether to check for conversion errors such as overflow.
safe : bool or None, default None
Check for conversion errors such as overflow. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions

Expand Down
5 changes: 3 additions & 2 deletions python/pyarrow/array.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -1184,8 +1184,9 @@ cdef class Array(_PandasConvertible):
----------
target_type : DataType, default None
Type to cast array to.
safe : boolean, default True
Whether to check for conversion errors such as overflow.
safe : bool or None, default None
Check for conversion errors such as overflow. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions
memory_pool : MemoryPool, optional
Expand Down
5 changes: 3 additions & 2 deletions python/pyarrow/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,9 @@ def cast(arr, target_type=None, safe=None, options=None, memory_pool=None):
arr : Array-like
target_type : DataType or str
Type to cast to
safe : bool, default True
Check for overflows or other unsafe conversions
safe : bool or None, default None
Check for overflows or other unsafe conversions. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions
memory_pool : MemoryPool, optional
Expand Down
5 changes: 3 additions & 2 deletions python/pyarrow/scalar.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ cdef class Scalar(_Weakrefable):
----------
target_type : DataType, default None
Type to cast scalar to.
safe : boolean, default True
Whether to check for conversion errors such as overflow.
safe : bool or None, default None
Check for conversion errors such as overflow. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions
memory_pool : MemoryPool, optional
Expand Down
15 changes: 9 additions & 6 deletions python/pyarrow/table.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,9 @@ cdef class ChunkedArray(_PandasConvertible):
----------
target_type : DataType, None
Type to cast array to.
safe : boolean, default True
Whether to check for conversion errors such as overflow.
safe : bool or None, default None
Check for conversion errors such as overflow. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions

Expand Down Expand Up @@ -3277,8 +3278,9 @@ cdef class RecordBatch(_Tabular):
----------
target_schema : Schema
Schema to cast to, the names and order of fields must match.
safe : bool, default True
Check for overflows or other unsafe conversions.
safe : bool or None, default None
Check for overflows or other unsafe conversions. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions

Expand Down Expand Up @@ -4627,8 +4629,9 @@ cdef class Table(_Tabular):
----------
target_schema : Schema
Schema to cast to, the names and order of fields must match.
safe : bool, default True
Check for overflows or other unsafe conversions.
safe : bool or None, default None
Check for overflows or other unsafe conversions. If ``options`` is
omitted, ``None`` uses a safe cast.
options : CastOptions, default None
Additional checks pass by CastOptions

Expand Down