Skip to content

Commit 5eeb23e

Browse files
committed
rename groupby arithmetic operation column
1 parent fc48214 commit 5eeb23e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/danfojs-base/aggregators/groupby.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,13 @@ export default class Groupby {
198198
else {
199199
if(Array.isArray(operation[colName])) {
200200
for(let ops of operation[colName]) {
201-
colVal[colName] = this.groupMathLog(keyVal[colName],ops)
201+
let colName2 = `${colName}_${ops}`
202+
colVal[colName2] = this.groupMathLog(keyVal[colName],ops)
202203
}
203204
} else {
204205
let ops: string = operation[colName] as string
205-
colVal[colName] = this.groupMathLog(keyVal[colName], ops)
206+
let colName2 = `${colName}_${ops}`
207+
colVal[colName2] = this.groupMathLog(keyVal[colName], ops)
206208
}
207209

208210
}

0 commit comments

Comments
 (0)