danfojs
danfojs copied to clipboard
Missing column with excel reader for mostly empty column
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
Same exact problem here. Might have to resort to filling in manually the missing columns by hand, which is less than ideal.
The same problem,does anyone have a solution?
Yep, also facing this issue.
For me it is caused when the top most row is empty. Then the column is not processed
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