-
Notifications
You must be signed in to change notification settings - Fork 108
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
Make io functions accept file like objects #107
Comments
Typed on phone, please excuse the formatting. I will work on refactoring the parsers. For the xlsx reader, I have to switch back to pandas.read_excel to specify openpyxl as the engine, since xlrd deprecated the support for xlsx file. But that shouldn’t make a difference for the purpose of reading from a file object. |
Fixed it in dfeea93. Added a wrapper To create a system object and load from file, use
In order for Andes to output correctly, you will need to call Let me know if you have other suggestions. |
Thank you very much for making these changes so quickly. This will be much more convenient than writing out to temporary files. |
You are welcome. As always, thank you for the suggestion. |
Is your feature request related to a problem? Please describe.
Currently, if I have data in memory that I wish to parse into a
System
it has to be written out to a temporary file and the path passed to aread
function from anio
module.Describe the solution you'd like
It would be good if the
io
modules hadread_file
functions that would accept file-like objects (e.g.StringIO
). These could be called from the existingread
functions that would still take paths and handle opening/closing files.Describe alternatives you've considered
The
xlsx
module already supports this as the PandasExcelFile
constructor accepts file-like objects. Thejson
module is simple enough to just copy, but thematpower
andpsse
modules callopen
.The text was updated successfully, but these errors were encountered: