I'm new to Python and I'm trying to crunch some numbers. Sample attached: Open High Low Close Sample Data
I have tested a few variations of importing data but failed. Really appreciate some advise. Thanks!
path = 'Data/Price.numbers'
with open(path) as file:
file.readline()
for line in file:
values = map(float, line.split())
test.append(values)
Key Objectives:
1) Efficiently store the table data in a format that I can easily manipulate and apply calculations > I'm thinking of a Dict{} > Any comments?
2) Optimised for quick calculations as I need to crunch data for multiple securities > I estimate about 1,000,000 to 2,000,000 datapoint.
Again, appreciate any advise to do this better.
The numbers-parser library can be used to parse .numbers
files. From the example on the Github page:
from numbers_parser import Document
doc = Document("my-spreasdsheet.numbers")
sheets = doc.sheets()
tables = sheets[0].tables()
rows = tables[0].rows()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With