numpy.core.defchararray.zfill()

numpy.core.defchararray.zfill

numpy.core.defchararray.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

© 2008–2017 NumPy Developers
Licensed under the NumPy License.
https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.core.defchararray.zfill.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部