pandas.Series.str.endswith

pandas 3.1.1 · Series and accessors · method

Check whether each string ends with the supplied suffix or any of the supplied suffixes.

Call syntax

Series.str.endswith(pat, na=…)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
pat Required
Positional or keyword
str or tuple[str, ...]

Specify the substring or regular expression to match.

na Optional
Positional or keyword
scalar

Supply the value to use for records whose input is missing.

Returns

Series or Index of bool