Links
Comment on page

Series.str.repeat

Repeat the the character(s) in a string for a specified number of time
danfo.Series.str.repeat(num, options) [source]
Parameters
Type
Description
Default
num
integer
the string to search for
1
options
Object
inplace: Whether to perform the operation in-place or not.
{
inplace: false
}
Returns: Series
Example
Node
Browser
const dfd = require("danfojs-node")
let data = ['a', 'b', 'c', 'd']
let sf = new dfd.Series(data)
sf.str.repeat(4).print()
Output
╔═══╤══════════════════════╗
║ │ 0 ║
╟───┼──────────────────────╢
║ 0 │ aaaa ║
╟───┼──────────────────────╢
║ 1 │ bbbb ║
╟───┼──────────────────────╢
║ 2 │ cccc ║
╟───┼──────────────────────╢
║ 3 │ dddd ║
╚═══╧══════════════════════╝