Series.str.substr
Obtain the substring from a String element in a Series, by specifying the number of string to obtain starting from a specific index.
Parameters
Type
Description
Default
const dfd = require("danfojs-node")
let data = ['lower part ', ' CAPITALS city', ' this is a sentence', ' SwAp CaSe']
let sf = new dfd.Series(data)
sf.str.substr(2, 4).print()╔═══╤══════════════════════╗
║ │ 0 ║
╟───┼──────────────────────╢
║ 0 │ wer ║
╟───┼──────────────────────╢
║ 1 │ APIT ║
╟───┼──────────────────────╢
║ 2 │ his ║
╟───┼──────────────────────╢
║ 3 │ SwAp ║
╚═══╧══════════════════════╝Last updated