Series.str.endsWith
Checks whether a string ends with specified characters
Parameters | Type | Description | Default |
---|---|---|---|
str | string | the character(s) to check | "" |
options | Object | inplace: Whether to perform the operation in-place or not. | { inplace: false } |
Returns: Series (Boolean element)
Example
Node
Browser
const dfd = require("danfojs-node")
let data = ['lower', 'CAPITALS', 'this is a sentence', 'SwApCaSe']
let sf = new dfd.Series(data)
sf.str.endsWith("e").print()
Output
╔═══╤══════════════════════╗
║ │ 0 ║
╟───┼──────────────────────╢
║ 0 │ false ║
╟───┼──────────────────────╢
║ 1 │ false ║
╟───┼──────────────────────╢
║ 2 │ true ║
╟───┼──────────────── ──────╢
║ 3 │ true ║
╚═══╧══════════════════════╝
Last modified 1yr ago