padding

padding#

2026-03-11

20 min read time

Applies to Linux

pylibhipdf.strings.padding.pad(Column input, size_type width, side_type side, unicode fill_char, Stream stream=None) Column#

Add padding to each string using a provided character.

For details, see cudf::strings::pad().

Parameters#

inputColumn

Strings instance for this operation

widthint

The minimum number of characters for each string.

sideSideType

Where to place the padding characters.

fill_charstr

Single UTF-8 character to use for padding

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New column with padded strings.

pylibhipdf.strings.padding.zfill(Column input, size_type width, Stream stream=None) Column#

Add ‘0’ as padding to the left of each string.

For details, see cudf::strings::zfill().

Parameters#

inputColumn

Strings instance for this operation

widthint

The minimum number of characters for each string.

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New column of strings.

pylibhipdf.strings.padding.zfill_by_widths(Column input, Column widths, Stream stream=None) Column#

Add ‘0’ as padding to the left of each string.

For details, see cudf::strings::zfill_by_widths().

Parameters#

inputColumn

Strings instance for this operation

widthsColumn

The minimum number of characters for each string.

streamStream | None

CUDA stream on which to perform the operation.

Returns#

Column

New column of strings.