Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

[Feature] Adding renameSome method for selectively renaming multiple columns at once #91

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions dataframe-js.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ export class DataFrame {

reduceRight(func: any, init: any): any;

rename(columnName: any, replacement: any): any;

renameAll(newColumnNames: any): any;

renameSome(columnsMap: Map<any,any>): any;
rename(columnsMap: Map<any,any>): any;

replace(value: any, replacement: any, columnNames: any): any;

Expand Down Expand Up @@ -272,11 +268,7 @@ export namespace DataFrame {

function reduceRight(func: any, init: any): any;

function rename(columnName: any, replacement: any): any;

function renameAll(newColumnNames: any): any;

function renameSome(columnsMap: Map<any,any>): any;
function rename(columnsMap: Map<any,any>): any;

function replace(value: any, replacement: any, columnNames: any): any;

Expand Down Expand Up @@ -502,18 +494,6 @@ export namespace DataFrame {

}

namespace renameAll {
const prototype: {
};

}

namespace renameSome {
const prototype: {
};

}

namespace replace {
const prototype: {
};
Expand Down
4 changes: 2 additions & 2 deletions doc/BASIC_USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ Each group in the GroupedDataFrame is a DataFrame. When you aggregate a GroupedD
````js
// Some examples
const groupedDF = df.groupBy('column1', 'column2');
groupedDF.aggregate(group => group.count()).rename('aggregation', 'groupCount');
df.groupBy('column2', 'column3').aggregate(group => group.stat.mean('column4')).rename('aggregation', 'groupMean');
groupedDF.aggregate(group => group.count()).rename({'aggregation': 'groupCount'});
df.groupBy('column2', 'column3').aggregate(group => group.stat.mean('column4')).rename({'aggregation':'groupMean'});
````

### Stat Module
Expand Down
Loading