After looking at different ways to read an url link, pointing to a .xls file, I decided to go with using xlrd.
I am having a difficult time converting a ‘xlrd.book.Book’ type to a ‘pandas.DataFrame’
I have the following:
socket = urllib2.urlopen(link)
#this line gets me the excel workbook
xlfile = xlrd.open_workbook(file_contents = socket.read())
#storing the sheets
sheets = xlfile.sheets()
I want to tak the last sheet of
sheets and import as a
pandas.DataFrame, any ideas as to how I can accomplish this? I’ve tried,
pandas.ExcelFile.parse() but it wants a path to an excel file. I can of certainly save the file to memory and then parse (using
tempfile or something), but I’m trying to follow pythonic guidelines and use functionality likely already written into pandas.
Any guidance is greatly appreciated as always.