We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 584ba18 commit ac3c969Copy full SHA for ac3c969
pandas/core/arrays/_arrow_string_mixins.py
@@ -63,7 +63,9 @@ def _str_pad(
63
return type(self)._from_sequence(result, dtype=self.dtype) # type: ignore[attr-defined]
64
else:
65
# GH#54792
66
- pa_pad = partial(pc.utf8_center, lean_left_on_odd_padding=False)
+ # https://github.com/apache/arrow/issues/15053#issuecomment-2317032347
67
+ lean_left = (width % 2) == 0
68
+ pa_pad = partial(pc.utf8_center, lean_left_on_odd_padding=lean_left)
69
70
raise ValueError(
71
f"Invalid side: {side}. Side must be one of 'left', 'right', 'both'"
0 commit comments