pyarrow.Column

class pyarrow.Column

Bases: object

Named vector of elements of equal type.

Warning

Do not call this class’s constructor directly.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

cast(self, target_type[, safe]) Cast column values to another data type
equals(self, Column other) Check if contents of two columns are equal
from_array(*args)
length(self)
to_pandas(self[, strings_to_categorical, …]) Convert the arrow::Column to a pandas.Series
to_pylist(self) Convert to a list of native Python objects.
cast(self, target_type, safe=True)

Cast column values to another data type

Parameters:
  • target_type (DataType) – Type to cast to
  • safe (boolean, default True) – Check for overflows or other unsafe conversions
Returns:

casted (Column)

data

The underlying data

Returns:pyarrow.ChunkedArray
equals(self, Column other)

Check if contents of two columns are equal

Parameters:other (pyarrow.Column) –
Returns:are_equal (boolean)
field
static from_array(*args)
length(self)
name

Label of the column

Returns:str
null_count

Number of null entires

Returns:int
shape

Dimensions of this columns

Returns:(int,)
to_pandas(self, strings_to_categorical=False, zero_copy_only=False)

Convert the arrow::Column to a pandas.Series

Returns:pandas.Series
to_pylist(self)

Convert to a list of native Python objects.

type

Type information for this column

Returns:pyarrow.DataType