Series.str.lastIndexOf
Obtain the position of the last found occurrence of a specified value in a string
Parameters
Type
Description
Default
const dfd = require("danfojs-node")
let data = ['lower', 'CAPITALS', 'this is a sentence', 'SwApCaSe']
let sf = new dfd.Series(data)
sf.str.lastIndexOf("r").print()╔═══╤══════════════════════╗
║ │ 0 ║
╟───┼──────────────────────╢
║ 0 │ 4 ║
╟───┼──────────────────────╢
║ 1 │ -1 ║
╟───┼──────────────────────╢
║ 2 │ -1 ║
╟───┼──────────────────────╢
║ 3 │ -1 ║
╚═══╧══════════════════════╝Last updated