Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.78 KB

series.str.touppercase.md

File metadata and controls

52 lines (42 loc) · 1.78 KB
description
Converts all characters to uppercase.

Series.str.toUpperCase

danfo.Series.str.toUpperCase(options) [source]

Parameters Type Description Default
options Object inplace: Whether to perform the operation in-place or not.

{

inplace: false

}

Returns: Series (String element)

Example

Convert all characters in each string element to capital letter

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

const dfd = require("danfojs-node")

let data = ['lower boy', 'CAPITALS', 'sentence', 'SwApCaSe']
let sf = new dfd.Series(data)
sf.str.toUpperCase().print()

{% endtab %}

{% tab title="Browser" %}

{% endtab %} {% endtabs %}

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

╔═══╤══════════════════════╗
║   │ 0                    ║
╟───┼──────────────────────╢
║ 0 │ LOWER BOY            ║
╟───┼──────────────────────╢
║ 1 │ CAPITALS             ║
╟───┼──────────────────────╢
║ 2 │ SENTENCE             ║
╟───┼──────────────────────╢
║ 3 │ SWAPCASE             ║
╚═══╧══════════════════════╝

{% endtab %} {% endtabs %}