Method: Polars::StringExpr#zfill
- Defined in:
- lib/polars/string_expr.rb
#zfill(length) ⇒ Expr
Fills the string with zeroes.
Return a copy of the string left filled with ASCII '0' digits to make a string of length width.
A leading sign prefix ('+'/'-') is handled by inserting the padding after the
sign character rather than before. The original string is returned if width is
less than or equal to s.length.
747 748 749 750 |
# File 'lib/polars/string_expr.rb', line 747 def zfill(length) length = Utils.parse_into_expression(length) Utils.wrap_expr(_rbexpr.str_zfill(length)) end |