Powered By GitBook
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
1
const dfd = require("danfojs-node")
2
3
let data = ['a', 'b', 'c', 'd']
4
let sf = new dfd.Series(data)
5
sf.str.repeat(4).print()
Copied!
1
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ │ 0 ║
3
╟───┼──────────────────────╢
4
║ 0 │ aaaa ║
5
╟───┼──────────────────────╢
6
║ 1 │ bbbb ║
7
╟───┼──────────────────────╢
8
║ 2 │ cccc ║
9
╟───┼──────────────────────╢
10
║ 3 │ dddd ║
11
╚═══╧══════════════════════╝
Copied!
Last modified 24d ago
Copy link