Powered By GitBook
Series.str.join
Join a new string value to all string elements in a Series.
danfo.Series.str.join(valToJoin, joinChar, options) [source]
Parameters
Type
Description
Default
valToJoin
String
the string value you want to
""
joinChar
String
The delimiter to specify the joining
" "
options
Object
inplace: Whether to perform the operation in-place or not.
{
inplace: false
}
Returns:
return Series
Examples
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.join("new", "_").print()
Copied!
1
Copied!
Output
1
╔═══╤════════════════════════╗
2
║ 0 │ lower part_new ║
3
╟───┼────────────────────────╢
4
║ 1 │ CAPITALS city_new ║
5
╟───┼────────────────────────╢
6
║ 2 │ this is a sentence_new ║
7
╟───┼────────────────────────╢
8
║ 3 │ SwAp CaSe_new ║
9
╚═══╧════════════════════════╝
Copied!
Last modified 24d ago
Copy link