[WIP] Add minimal Excel loader and supporting tests for Excel & CSV#46
[WIP] Add minimal Excel loader and supporting tests for Excel & CSV#46neiljp wants to merge 2 commits intoricklupton:masterfrom
Conversation
|
This looks good to me! I like the tests for loading from files. I think most people who want to load from Excel would want to load different components from different sheets within the same workbook, as you say. But it would be nice to be flexible about using different files too. Perhaps an API like this? But definitely open to suggestions if you have a better idea. Dataset.from_excel(flows_filename, process_filename=None, material_filename=None,
time_filename=None, flows_sheet=None, process_sheet=None,
material_sheet=None, time_sheet=None)
|
|
For the material and time tables, you're right, we don't actually have an example of using this at the moment. It could look like this, if you want to add one. Materials:
Time:
|
|
Also, while you're at it please could you add yourself to the list of contributors at the end of the README (assuming you're happy to be listed there)? |
|
Hi @neiljp, just wondering if you are still planning to do any more on this? No hurry if so, just let me know at some point. |
5f8af93 to
03b0c3f
Compare
42c15dc to
13f7d2f
Compare
While the wrapper around pandas is minimal, I thought it would be useful to add tests for the CSV support, with fixture files, and then extend this to Excel. I used libreoffice to load the csv and save to two different excel (.xlsx) formats. I'm not sure there's a material or time file available in the current repo, so I've explicitly marked that as unsupported until there's more detail.
It would be great to get some feedback on this before I proceed further, but of course there are many extensions possible, such as loading each component of the data from different sheets, including within the same excel file.