bigframes.pandas.api.typing.StringMethods.zfill#

StringMethods.zfill(width:int)T[source]#

Pad strings in the Series/Index by prepending ‘0’ characters.

Strings in the Series/Index are padded with ‘0’ characters on theleft of the string to reach a total string lengthwidth. Stringsin the Series/Index with length greater or equal towidth areunchanged.

Examples:

>>>importbigframes.pandasasbpd
>>>s=bpd.Series(['-1','1','1000',pd.NA])>>>s0      -11       12    10003    <NA>dtype: string
>>>s.str.zfill(3)0     -011     0012    10003    <NA>dtype: string
Parameters:

width (int) – Minimum length of resulting string; strings with length lessthanwidth be prepended with ‘0’ characters.

Returns:

Series of objects.

Return type:

bigframes.series.Series

This Page