Series.str.repeat

Repeat the the character(s) in a string for a specified number of time

danfo.Series.str.repeat(num, options) [source]

ParametersTypeDescriptionDefault

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

const dfd = require("danfojs-node")

let data = ['a', 'b', 'c', 'd']
let sf = new dfd.Series(data)
sf.str.repeat(4).print()
╔═══╤══════════════════════╗
║   │ 0                    ║
╟───┼──────────────────────╢
║ 0 │ aaaa                 ║
╟───┼──────────────────────╢
║ 1 │ bbbb                 ║
╟───┼──────────────────────╢
║ 2 │ cccc                 ║
╟───┼──────────────────────╢
║ 3 │ dddd                 ║
╚═══╧══════════════════════╝

Last updated