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

Method copy

src/danfojs-base/core/frame.ts:2020–2028  ·  view source on GitHub ↗

* Makes a deep copy of a DataFrame. * @example * ``` * const df = new DataFrame([[1, 2], [3, 4]], { columns: ['A', 'B']}) * const df2 = df.copy() * df2.print() * ```

()

Source from the content-addressed store, hash-verified

2018 * ```
2019 */
2020 copy(): DataFrame {
2021 let df = new DataFrame([...this.$data], {
2022 columns: [...this.columns],
2023 index: [...this.index],
2024 dtypes: [...this.dtypes],
2025 config: { ...this.$config }
2026 });
2027 return df;
2028 }
2029
2030 /**
2031 * Return a boolean, same-sized object indicating where elements are empty (NaN, undefined, null).

Callers 4

headMethod · 0.95
tailMethod · 0.95
pctChangeMethod · 0.95
diffMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected