Closed archanaanz closed 2 years ago
let df_subset = df_basedata.query({ column: filter_from, is: "==", to: filter_value })
Hi, for newer version of danfojs, you can need to pass a boolean mask to the query function. So use this instead:
let df_subset = df.query(df_basedata["filter_from"].eq(filter_value))
Describe the bug filter_from = "Business Unit" filter_value = "Engineering (Code 1234)"
let df_subset = df_basedata.query({ column: filter_from, is: "==", to: filter_value })
df_subset has column headers as numbers rather than headers from df_basedata.
if version 1.0.0 is used then it errors as:
indexing.ts:33 Uncaught Error: rows parameter must be an Array. For example: rows: [1,2] or rows: ["0:10"] at _iloc (indexing.ts:33:1) at DataFrame.query (frame.ts:2290:27) at ProcessExcel (xxx.js:124:33) at Upload.reader.onload (xxx.js:48:21) _iloc @ indexing.ts:33 DataFrame.query @ frame.ts:2290 ProcessExcel @ xxx.js:124 Upload.reader.onload @ xxxjs:48
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.