danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Missing column with excel reader for mostly empty column

Open matt-erhart opened this issue 2 years ago • 4 comments

Missing column with excel reader in nodejs. The column has a header name and many but not all blanks in the rows. I think this is because the xlsx package represents blanks as a missing key in the json rather than keeping the key and setting null, but need to test out more. Danfo may not be handling the conversion from json when some keys are missing or mostly missing. I am also seeing values from the missing column showing up in another column.

Make a column start out with empty values and be mostly empty, and it won't be in the columns list. You might see the missing columns values show up in another column. If I put a value in every row, the column shows up.

  • OS: windows
  • node 16

matt-erhart avatar Aug 01 '23 22:08 matt-erhart

Same exact problem here. Might have to resort to filling in manually the missing columns by hand, which is less than ideal.

marnunez avatar Feb 07 '24 20:02 marnunez

The same problem,does anyone have a solution?

DogeVenci avatar Jun 21 '24 02:06 DogeVenci

Yep, also facing this issue.

For me it is caused when the top most row is empty. Then the column is not processed

jaycoolslm avatar Jun 24 '24 14:06 jaycoolslm

Solution (ish) can be found here https://github.com/javascriptdata/danfojs/issues/643#issuecomment-2186873734

You need to create the json data yourself using XLSX then can create a new dataframe

jaycoolslm avatar Jun 24 '24 15:06 jaycoolslm