简体   繁体   中英

importing binary data into Python and then exporting to Excel

I would like to upload a large number of binary values from a file (a .phys file) into Python and then export these values into Excel for graphing purposes. Excel only supports ~32,000 rows at a time, but I have up to 3mil values in some cases. I am able to upload the data set into Python using

f = open("c:\\DR005289_F00001.PHYS", "rb")

How do I then export this file to Excel in a format which Excel can support? For example, how could I break up the data into columns? I don't care how many values are in each column, it can be an arbitrary break depending on what Excel can support.

This has served me well. Use xlwt to Put all the data into the file.

I would create a list of lists to break the data into columns. Write each list (pick a length, 10k?) to the excel file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM