description |
---|
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
{% 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 %}