-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Milestone
Description
We came across a situation where we had a file object representing Excel data (came from HTTP POST but I'm thinking it could also come from MongoDB for example), and would've liked to pass it directly to Pandas to parse (vs saving it to disk and passing path to Pandas).
Could this be possible?
I saw that xlrd had file_contents
as a possible argument of open_workbook
:
https://github.com/python-excel/xlrd/blob/master/xlrd/__init__.py#L385
Maybe ExcelFile
in Pandas could take path_or_buffer
as argument, and pass along the correct one to xlrd.
https://github.com/pydata/pandas/blob/master/pandas/io/parsers.py#L1133
Don't know if that could work for openpyxl also.
Thoughts?
Thanks!
Nicolas
stevekm