Skip to content

read_excel is missing the first row of data #260

Description

@spleshakov

zip_code_file.xlsx

╔═══╤═══════════════════╤═══════════════════╗
║   │ Zip Code          │ County Name       ║
╟───┼───────────────────┼───────────────────╢
║ 0 │ 90001             │ LOS ANGELES       ║
╟───┼───────────────────┼───────────────────╢
║ 1 │ 90002             │ LOS ANGELES       ║
╟───┼───────────────────┼───────────────────╢
║ 2 │ 90003             │ LOS ANGELES       ║
╟───┼───────────────────┼───────────────────╢
║ 3 │ 90004             │ LOS ANGELES       ║
╚═══╧═══════════════════╧═══════════════════╝

code

const danfojs = require("danfojs-node");

(async () => {
	let df = await danfojs.read_excel(
		`${__dirname}/zip_code_file.xlsx`,
	)

	df.print()
})()

output

╔═══╤═══════════════════╤═══════════════════╗
║   │ Zip Code          │ County Name       ║
╟───┼───────────────────┼───────────────────╢
║ 0 │ 90002             │ LOS ANGELES       ║
╟───┼───────────────────┼───────────────────╢
║ 1 │ 90003             │ LOS ANGELES       ║
╟───┼───────────────────┼───────────────────╢
║ 2 │ 90004             │ LOS ANGELES       ║
╚═══╧═══════════════════╧═══════════════════╝

Issue
The first data record is missing

Additionally, I tried to explicitly specify 1st row like so

const danfojs = require("danfojs-node");

(async () => {
	let df = await danfojs.read_excel(
		`${__dirname}/zip_code_file.xlsx`,
		{
			header_index:0,
			data_index:1
		}
	)

	df.print()
})()

But got the same result like if the config was ignored

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions