Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When using use_columns it still reads other columns #327

Open
deanm0000 opened this issue Jan 22, 2025 · 0 comments
Open

When using use_columns it still reads other columns #327

deanm0000 opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working 🦀 rust 🦀 Pull requests that edit Rust code

Comments

@deanm0000
Copy link
Contributor

See here

Suppose we have an excel file that looks like this:

Image

then run

from fastexcel import read_excel
read_excel(file_path).load_sheet(0, use_columns=["apple","banana"])

it raises with:

CalamineCellError: calamine cell error: #DIV/0!
Context:
    0: could not determine dtype for column blah

It should just ignore that column since it isn't in the use_columns list.

The work around is to tell it to make the other column a string

read_excel(file_path).load_sheet(0, use_columns=["apple","banana"], dtypes={"blah":"string"})
@lukapeschke lukapeschke added bug Something isn't working 🦀 rust 🦀 Pull requests that edit Rust code labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🦀 rust 🦀 Pull requests that edit Rust code
Projects
None yet
Development

No branches or pull requests

2 participants