-
Notifications
You must be signed in to change notification settings - Fork 24
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
write reader and writer for common format as csv and xls #97
Comments
By the way, In the next upcoming commit I will suppress the dependence to xlrd (used in only one orphan util file) |
ooups correction! xlrd is used in read_carrousel. May be we could look if we cannot use pandas instead to avoid importing additional librairies? @atravert |
Yes. but i can change it for the panda reader. when i think about this issue, the main "difficulty" we will have is to define where/how to write the data and maybe the meta data. Because these methods will be mostly used to read/export from/to third party applications that will all have specific requirements For instance in csv/excel:
And in any case where to store the other meta data ? in excel: on a specific sheet ; in csv: on a specific file ? or on the first lines of the csv ? , but then it will be less readable by 3d party apps. For the, reading, the main difficulty is that the locations of data and metadata and th eformats will change a lot depending on the applications, and on the version of the apps, etc... So for the reader part, I was actually wondering if it is worth wrapping existing libraries for reading - that will probably lead to less flexibility ?, instead of using directly pandas ? On a closely related subject: you mentioned the CSDM developped by D. Massiot et al. It would be also interesting to look at the open netCDF format (also used by xarray) , which is binary and widely used (though not much in chemistry). Before writing routines to read/write csv of excel to/from Spectrochempy , it could be interesting to see which are the current solutions adopted to convert netCDF to/from csv or excel ? ; |
We need to export to tabulated format (csv, xls... ) or to export form these formats. Other formats could also be interesting.
Solution:
Instead of writing completely new module, we can take advantage that Pandas is already present in the required package and write some wrappers to the function present in this library:
https://pandas.pydata.org/pandas-docs/stable/reference/io.html
The text was updated successfully, but these errors were encountered: