Powered By GitBook
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
1
const dfd = require("danfojs-node")
2
3
let data = ['lower boy', 'CAPITALS', 'sentence', 'SwApCaSe']
4
let sf = new dfd.Series(data)
5
sf.str.toUpperCase().print()
Copied!
1
Copied!
Output
1
╔═══╤══════════════════════╗
2
║ │ 0 ║
3
╟───┼──────────────────────╢
4
║ 0 │ LOWER BOY ║
5
╟───┼──────────────────────╢
6
║ 1 │ CAPITALS ║
7
╟───┼──────────────────────╢
8
║ 2 │ SENTENCE ║
9
╟───┼──────────────────────╢
10
║ 3 │ SWAPCASE ║
11
╚═══╧══════════════════════╝
Copied!
Last modified 24d ago
Copy link