Series.str.toUpperCase

Converts all characters to uppercase.

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

ParametersTypeDescriptionDefault

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

const dfd = require("danfojs-node")

let data = ['lower boy', 'CAPITALS', 'sentence', 'SwApCaSe']
let sf = new dfd.Series(data)
sf.str.toUpperCase().print()
╔═══╤══════════════════════╗
║   │ 0                    ║
╟───┼──────────────────────╢
║ 0 │ LOWER BOY            ║
╟───┼──────────────────────╢
║ 1 │ CAPITALS             ║
╟───┼──────────────────────╢
║ 2 │ SENTENCE             ║
╟───┼──────────────────────╢
║ 3 │ SWAPCASE             ║
╚═══╧══════════════════════╝

Last updated