Describe the bug, including details regarding any error messages, version, and platform.
In [1]: import pyarrow as pa; import pyarrow.compute as pc
In [2]: pa.__version__
Out[2]: '10.0.1'
In [3]: s = "bb"
In [4]: s.center(5, "X")
Out[4]: 'XXbbX'
In [5]: pc.utf8_center(pa.scalar(s), 5, padding="X")
Out[5]: <pyarrow.StringScalar: 'XbbXX'>
I suppose in theory it's arbitrary where the two XX are added (front or back) to center the string, but I would expect to match the standard library behavior for consistency
Component(s)
Python