Series.str.toUpperCase
Converts all characters to uppercase.
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
Node
Browser
const dfd = require("danfojs-node")
let data = ['lower boy', 'CAPITALS', 'sentence', 'SwApCaSe']
let sf = new dfd.Series(data)
sf.str.toUpperCase().print()
Output
╔═══╤══════════════════════╗
║ │ 0 ║
╟───┼──────────────────────╢
║ 0 │ LOWER BOY ║
╟───┼──────────────────────╢
║ 1 │ CAPITALS ║
╟───┼──────────────────────╢
║ 2 │ SENTENCE ║
╟───┼──────────────────────╢
║ 3 │ SWAPCASE ║
╚═══╧══════════════════════╝
Copy link