polars.Series.bin.ends_with#

Series.bin.ends_with(suffix: IntoExpr) Series[source]#

Check if string values end with a binary substring.

Parameters:
suffix

Suffix substring.

Examples

>>> s = pl.Series("colors", [b"\x00\x00\x00", b"\xff\xff\x00", b"\x00\x00\xff"])
>>> s.bin.ends_with(b"\x00")
shape: (3,)
Series: 'colors' [bool]
[
    true
    true
    false
]