Method: Polars::StringNameSpace#starts_with

Defined in:
lib/polars/string_name_space.rb

#starts_with(prefix) ⇒ Series

Check if string values start with a substring.

Examples:

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

Parameters:

  • prefix (String)

    Prefix substring.

Returns:



407
408
409
# File 'lib/polars/string_name_space.rb', line 407

def starts_with(prefix)
  super
end