numpy / 1.22.0 / reference / generated / numpy.char.zfill.html /

numpy.char.zfill

char. zfill ( a, width ) [source]

Return the numeric string left-filled with zeros

Calls str.zfill element-wise.

Parameters
a array_like, {str, unicode}

Input array.

width int

Width of string to left-fill elements in a.

Returns
out ndarray, {str, unicode}

Output array of str or unicode, depending on input type

See also

str.zfill

© 2005–2021 NumPy Developers
Licensed under the 3-clause BSD License.
https://numpy.org/doc/1.22/reference/generated/numpy.char.zfill.html