| [ Web Proxy ] |
| Viewing: https://numpy.org/doc/stable/reference/generated/../c-api/../generated/numpy.char.zfill.html | [Back] [Original] |
Return the numeric string left-filled with zeros. A leading
sign prefix (+/-) is handled by inserting the padding
after the sign character rather than before.
StringDType, bytes_, or str_ dtypeWidth of string to left-fill elements in a.
Output array of StringDType, bytes_ or str_ dtype,
depending on input type
See also
Examples
>>> import numpy as np
>>> np.strings.zfill(['1', '-1', '+1'], 3)
array(['001', '-01', '+01'], dtype='<U3')
| Web Proxy Viewer | New URL | Original Page |