Powered By GitBook
Series.str.trim
Remove leading and trailing Whitespace from a String element
danfo.Series.str.trim(options) [source]
Parameters
Type
Description
Default
options
Object
inplace: Whether to perform the operation in-place or not.
{
inplace: false
}
Returns:
return Series
Node
Browser
1
const dfd = require("danfojs-node")
2
3
let data = ['lower part ', ' CAPITALS city', ' this is a sentence', ' SwAp CaSe']
4
let sf = new dfd.Series(data)
5
sf.str.trim().print()
Copied!
1
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ │ 0 ║
3
╟───┼──────────────────────╢
4
║ 0 │ lower part ║
5
╟───┼──────────────────────╢
6
║ 1 │ CAPITALS city ║
7
╟───┼──────────────────────╢
8
║ 2 │ this is a sentence ║
9
╟───┼──────────────────────╢
10
║ 3 │ SwAp CaSe ║
11
╚═══╧══════════════════════╝
Copied!
Last modified 24d ago
Copy link