xlrd and cPickle.dump
Hi all,
I have to work with a very large excel file and I have two questions.
First, the documentation says that cPickle.dump would be the best way
to work with it. However, I keep getting:
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py", line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:\python_files\pickle_test.py", line 12, in ?
cPickle.dump(book,wb.save(pickle_path))
File "C:\Python24\lib\copy_reg.py", line 69, in _reduce_ex
raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle file objects
I tried to use open(filename, 'w') as well as pyExcelerator
(wb.save(pickle_path)) to create the pickle file, but neither worked.
Secondly, I am trying to make an ID number from three columns of data:
category | topic | sub_topic, so that I can . I imagine that a
dictionary would be the best way to sort out the repeats
.
Relevant Pages
- xlrd and cPickle.dump/rows to list
... I have to work with a very large excel file and I have two questions. ... the documentation says that cPickle.dump would be the best way ... as well as pyExcelerator ... to create the pickle file, ... (comp.lang.python) - RE: TransferSpreadsheet - how to get it to overwrite
... I don't know what documentation you read that says it replaces the existing ... TransferSpreadsheet into the Access table from the Excel file. ... > However the app sometimes uses a bound data grid to display data from ... (microsoft.public.access.externaldata) - Re: Using Visual Basic 6.0 to manipulate data in Excel files
... "API" is typically used when requesting information on accessing the Windows ... documentation on their Visual Basic 6 API to access/manipulate/etc Excel ... macros in Excel so that I can press a button in one Excel file "a.xls", ... Dim mXLApp as Excel.Application ... (microsoft.public.vb.general.discussion) - save to excel file
... i'd like to have specific cells of the file saved to another ... excel file located on a server. ... open the remote excel file each time just to save. ... seen some documentation for vb and for accessing ms access files but i ... (microsoft.public.excel.programming) - Importing excel file
... I want to be able to read an Excel file into my application. ... want to display it in a view, I just want to be able to read the ... with automation, but that's all very confusion, and I can find no ... documentation at all on it. ... (microsoft.public.vc.mfc) |
|