padding#

pylibcudf.strings.padding.pad(
Column input,
size_type width,
side_type side,
str fill_char,
stream=None,
DeviceMemoryResource mr=None,
) Column#

Add padding to each string using a provided character.

For details, see 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.

pylibcudf.strings.padding.zfill(
Column input,
size_type width,
stream=None,
DeviceMemoryResource mr=None,
) Column#

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

For details, see 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.

pylibcudf.strings.padding.zfill_by_widths(
Column input,
Column widths,
stream=None,
DeviceMemoryResource mr=None,
) Column#

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

For details, see 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.