danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

version: 0.3.3 danfo.query converts column headers to numbers

Open archanaanz opened this issue 3 years ago • 0 comments

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

  1. See error

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context Add any other context about the problem here.

archanaanz avatar Sep 01 '22 01:09 archanaanz