Powered By GitBook
Series.str.startsWith
Test whether a string begins with specified characters
danfo.Series.str.startsWith(str, options) [source]
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)
Examples
Node
Browser
1
const dfd = require("danfojs-node")
2
3
let data = ['lower', 'CAPITALS', 'this is a sentence', 'SwApCaSe']
4
let sf = new dfd.Series(data)
5
sf.str.startsWith("S").print()
Copied!
1
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ │ 0 ║
3
╟───┼──────────────────────╢
4
║ 0 │ false ║
5
╟───┼──────────────────────╢
6
║ 1 │ false ║
7
╟───┼──────────────────────╢
8
║ 2 │ false ║
9
╟───┼──────────────────────╢
10
║ 3 │ true ║
11
╚═══╧══════════════════════╝
Copied!
Last modified 24d ago
Copy link