tabsdata.tableframe.expr.string.ExprStringNameSpace.pad_end#
- ExprStringNameSpace.pad_end(length: int, fill_char: str = ' ') Expr [source]#
Pad string values at the end to the given length using the given fill character.
- Parameters:
length – The length to end pad the string to.
fill_char – The character to use for padding.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> >>> tf.select(td.col("a"), td.col("a").str.pad_end(6, "-").alias("pad_end")) >>> ┌────────┬─────────┐ │ a ┆ pad_end │ │ --- ┆ --- │ │ str ┆ str │ ╞════════╪═════════╡ │ abc ┆ abc--- │ │ def ┆ def │ │ null ┆ null │ └────────┴─────────┘