pyarrow.compute.make_struct#

pyarrow.compute.make_struct(*args, field_names=(), field_nullability=None, field_metadata=None, options=None, memory_pool=None)#

Wrap Arrays into a StructArray.

Names of the StructArray’s fields are specified through MakeStructOptions.

Parameters:
*argsArray-like or scalar-like

Argument to compute function.

field_namessequence of str

Names of the struct fields to create.

field_nullabilitysequence of bool, optional

Nullability information for each struct field. If omitted, all fields are nullable.

field_metadatasequence of KeyValueMetadata, optional

Metadata for each struct field.

optionspyarrow.compute.MakeStructOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.