| [ Web Proxy ] |
| Viewing: https://arrow.apache.org/docs/python/generated/../generated/pyarrow.compute.pivot_wider.html | [Back] [Original] |
Section Navigation
Pivot values according to a pivot key column.
Output is a struct with as many fields as PivotWiderOptions.key_names. All output struct fields have the same type as pivot_values. Each pivot key decides in which output field the corresponding pivot value is emitted. If a pivot key doesnt appear, null is emitted. If more than one non-null value is encountered for a given pivot key, Invalid is raised. The pivot key column can be string, binary or integer. The key_names will be cast to the pivot key column type for matching. Behavior of unexpected pivot keys is controlled by unexpected_key_behavior in PivotWiderOptions.
Argument to compute function.
Argument to compute function.
strThe 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.
str, default ignoreThe 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.
pyarrow.compute.PivotWiderOptions, optionalAlternative way of passing options.
pyarrow.MemoryPool, optionalIf not passed, will allocate memory from the default memory pool.
Copyright 2016-2026 Apache Software Foundation.
Apache Arrow, Arrow, Apache, the Apache logo, and the Apache Arrow project logo are either registered trademarks or trademarks of The Apache Software Foundation in the United States and other countries.
Created using Sphinx 9.1.0.
Built with the PyData Sphinx Theme 0.20.0.
| Web Proxy Viewer | New URL | Original Page |