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
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.join("new", "_").print()
Output
╔═══╤════════════════════════╗
║ 0 │ lower part_new ║
╟───┼────────────────────────╢
║ 1 │ CAPITALS city_new ║
╟───┼────────────────────────╢
║ 2 │ this is a sentence_new ║
╟───┼────────────────────────╢
║ 3 │ SwAp CaSe_new ║
╚═══╧════════════════════════╝
Copy link