我正在尝试处理一些数字:
我测试了几种导入数据的变体,但都失败了。非常感谢一些建议。谢谢!
path = 'Data/Price.numbers'
with open(path) as file:
file.readline()
for line in file:
values = map(float, line.split())
test.append(values)
主要目标:
以我可以轻松操作和应用计算的格式高效存储表数据 > 我在考虑 Dict{} > 有什么意见吗?
针对快速计算进行了优化,因为我需要处理多种证券的数据 > 我估计大约有 1,000,000 到 2,000,000 个数据点。
最佳答案
numbers-parser库可用于解析 .numbers
文件。来自 Github 页面上的示例:
from numbers_parser import Document
doc = Document("my-spreasdsheet.numbers")
sheets = doc.sheets()
tables = sheets[0].tables()
rows = tables[0].rows()
关于python - 从 Mac .numbers 文件导入表格数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48023771/