pyarrow.compute.PivotWiderOptions#

class pyarrow.compute.PivotWiderOptions(key_names, *, unexpected_key_behavior='ignore')#

Bases: _PivotWiderOptions

Options for the pivot_wider function.

Parameters:
key_namessequence of str

The pivot key names expected in the pivot key column. For each entry in key_names, a column with the same name is emitted in the struct output.

unexpected_key_behaviorstr, default “ignore”

The behavior when pivot keys not in key_names are encountered. Accepted values are “ignore”, “raise”. If “ignore”, unexpected keys are silently ignored. If “raise”, unexpected keys raise a KeyError.

__init__(self, key_names, *, unexpected_key_behavior='ignore')#

Methods

__init__(self, key_names, *[, ...])

deserialize(buf)

Deserialize options for a function.

serialize(self)

static deserialize(buf)#

Deserialize options for a function.

Parameters:
bufBuffer

The buffer containing the data to deserialize.

serialize(self)#