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

Method getDummies

src/danfojs-base/core/frame.ts:3325–3341  ·  view source on GitHub ↗
(options?: {
        columns?: string | Array<string>,
        prefix?: string | Array<string>,
        prefixSeparator?: string | Array<string>,
        inplace?: boolean
    })

Source from the content-addressed store, hash-verified

3323 inplace?: boolean
3324 }): DataFrame
3325 getDummies(options?: {
3326 columns?: string | Array<string>,
3327 prefix?: string | Array<string>,
3328 prefixSeparator?: string | Array<string>,
3329 inplace?: boolean
3330 }): DataFrame | void {
3331 const { inplace } = { inplace: false, ...options }
3332
3333 const encodedDF = dummyEncode(this, options)
3334 if (inplace) {
3335 this.$setValues(encodedDF.values, false, false)
3336 this.$setColumnNames(encodedDF.columns)
3337 } else {
3338 return encodedDF
3339 }
3340
3341 }
3342
3343 /**
3344 * Groupby

Callers

nothing calls this directly

Calls 3

dummyEncodeFunction · 0.85
$setValuesMethod · 0.80
$setColumnNamesMethod · 0.65

Tested by

no test coverage detected