MCPcopy Index your code
hub / github.com/javascriptdata/danfojs / toLowerCase

Method toLowerCase

src/danfojs-base/core/strings.ts:46–67  ·  view source on GitHub ↗
(options?: { inplace?: boolean })

Source from the content-addressed store, hash-verified

44 */
45 toLowerCase(options?: { inplace?: boolean }): Series
46 toLowerCase(options?: { inplace?: boolean }): Series | void {
47 const { inplace } = { inplace: false, ...options }
48 const newArr: Array<string | number> = [];
49 this.values.map((val) => {
50 if (utils.isEmpty(val)) {
51 newArr.push(NaN);
52 } else {
53 newArr.push(`${val}`.toLowerCase());
54 }
55
56 });
57
58 if (inplace) {
59 this.series.$setValues(newArr as ArrayType1D)
60 this.series.print()
61 } else {
62 const sf = this.series.copy()
63 sf.$setValues(newArr as ArrayType1D)
64 return sf;
65 }
66
67 }
68
69 /**
70 * Converts all characters to uppercase.

Callers 5

strings.test.jsFile · 0.80
series.test.jsFile · 0.80
capitalizeMethod · 0.80
strings.test.tsFile · 0.80
series.test.tsFile · 0.80

Calls 5

isEmptyMethod · 0.80
$setValuesMethod · 0.80
mapMethod · 0.65
printMethod · 0.65
copyMethod · 0.65

Tested by

no test coverage detected