开发者

Python Excel parsing data with xlrd

Fairly simple; I've got the data I want out of the excel file, but can't seem to find anything inside the XLRD readme that exp开发者_如何学JAVAlains how to go from this:

xldate:40397.007905092592
number:10000.0
text:u'No'
number:0.1203
number:0.096000000000000002
number:0.126

to their respective python datatypes. Any ideas?


did you tried the documentation help --> date_function


I had the same issue and used the following as a last resort:

def numobj2fl(p):
    return float(str(p).split(":")[1])

for converting the 'number object' to float.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜