Skip to content

Latest commit

 

History

History
51 lines (42 loc) · 1.85 KB

series.str.repeat.md

File metadata and controls

51 lines (42 loc) · 1.85 KB
description
Repeat the the character(s) in a string for a specified number of time

Series.str.repeat

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

{% tabs %} {% tab title="Node" %}

const dfd = require("danfojs-node")

let data = ['a', 'b', 'c', 'd']
let sf = new dfd.Series(data)
sf.str.repeat(4).print()

{% endtab %}

{% tab title="Browser" %}

{% endtab %} {% endtabs %}

{% tabs %} {% tab title="Output" %}

╔═══╤══════════════════════╗
║   │ 0                    ║
╟───┼──────────────────────╢
║ 0 │ aaaa                 ║
╟───┼──────────────────────╢
║ 1 │ bbbb                 ║
╟───┼──────────────────────╢
║ 2 │ cccc                 ║
╟───┼──────────────────────╢
║ 3 │ dddd                 ║
╚═══╧══════════════════════╝

{% endtab %} {% endtabs %}