-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: table support for Excel (XLSX) sheets #282
feat: table support for Excel (XLSX) sheets #282
Conversation
Implemented functionality to read and work with named tables within Excel sheets, extending support for lazy loading and error handling. Updated `.gitignore`, added corresponding tests, and refined error structures and build processes.
Oh wow thanks a lot! I'll review this ASAP. In the meantime, could you please rebase the branch and run |
Implemented functionality to read and work with named tables within Excel sheets, extending support for lazy loading and error handling. Updated `.gitignore`, added corresponding tests, and refined error structures and build processes.
…ture/extract-tables # Conflicts: # python/fastexcel/_fastexcel.pyi # python/tests/test_tables.py # src/types/python/excelreader.rs # src/types/python/excelsheet/table.rs # test.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your work, looks great overall 🚀
Since it's a pretty big change, I'd like @PrettyWood to have a look as well, as I might have missed some parts (he'll be back from vacation next week).
Also, I wonder wether we should introduce a new type for tables: It'd allow us to store some extra metadata, and would allow us to add to_{arrow,polars,pandas}
methods as well. As a nice side effect, it would also avoid the clone
there currently is without needing changes on the calamine side
Anyway, this has motivated me again to polish the README and add some proper contributor docs 😅
src/types/python/excelreader.rs
Outdated
// TODO: Remove clone | ||
ExcelSheetData::from(range.clone()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I believe the best solution would be to submit a change to calamine: Either make the data
field pub
in or add a pub into_data(self) -> T
method to the Table
type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've opened a PR: tafia/calamine#464
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the TODO
with "to update once calamine v.... is added"
Co-authored-by: Luka Peschke <mail@lukapeschke.com>
Co-authored-by: Luka Peschke <mail@lukapeschke.com>
Co-authored-by: Luka Peschke <mail@lukapeschke.com>
Very cool feature, it would also be useful for me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks a lot
src/types/python/excelreader.rs
Outdated
// TODO: Remove clone | ||
ExcelSheetData::from(range.clone()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update the TODO
with "to update once calamine v.... is added"
@lukapeschke Yup I reckon we should differentiate |
I don't have time for this this week. So depending on your timelines you might want to merge and open a new branch. If you can wait a week I can spend some time then. |
@wdoppenberg Let's merge this as is then to avoid more merge conflicts, and I'll see what I can do regarding the new Table object 🙂 Could you please give me push rights on your fork ? I'll fix the conflicts and merge the PR afterwards |
Should work: |
Signed-off-by: Luka Peschke <luka.peschke@toucantoco.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks a lot @wdoppenberg 🙏
Implemented functionality to read and work with named tables within Excel sheets. Updated
.gitignore
, added corresponding tests.One note: I'm using a
clone()
in thebuild_table
method, please advise on how to get rid of this. Also, please give me feedback on eager vs. lazy loading, I believe some refinement might be necessary there.Related issue: #204