Method: Polars::StringNameSpace#ends_with

Defined in:
lib/polars/string_name_space.rb

#ends_with(suffix) ⇒ Series

Check if string values end with a substring.

Examples:

s = Polars::Series.new("fruits", ["apple", "mango", nil])
s.str.ends_with("go")
# =>
# shape: (3,)
# Series: 'fruits' [bool]
# [
#         false
#         true
#         null
# ]

Parameters:

  • suffix (String)

    Suffix substring.

Returns:



385
386
387
# File 'lib/polars/string_name_space.rb', line 385

def ends_with(suffix)
  super
end