Skip to main content

为 OHLC 处理去 pandas 化,从而避免大量的 pandas 内存拷贝,达到性能优化的效果(大概 8000%)。

内部存储为 { "low": [], "high": [] }

可将 ohlc_object[num]['key'] 的调用转化为 ohlc_object['key'][num] 的调用。

init

obj = OHLCObject()
obj['open'] = [1, 2, ...]
obj['high'] = [100, 200, ...]
obj['low'] = [1, 2, ...]
obj['close'] = [100, 200, ...]
obj['timestamp'] = [1498924800000, 1498939200000, ...]
return obj

merge (concat OHLC)

Merge obj2 into obj1, automatically sort using 'timestamp' key

obj1.merge(obj2)

read

obj['low'][1]  # best performance
obj[1]['low']
obj[3:][1]['low']

Metadata

Release files for ohlcobject 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ohlcobject 1.2
File Size Uploaded Provenance
ohlcobject-1.2.tar.gz 5.2 kB Without provenance Details

Release files / ohlcobject-1.2.tar.gz

Download URL ohlcobject-1.2.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
368f15ca5d6e266d306a7d556608111d17bb54c7d46a8ea85a2901cb96ab7b63
BLAKE2b-256 checksum
How to use checksums
2cb08919c55d01cd2dfa321365f8cb508a1d0a5cb316dcbd8d045b0b8941cce9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.9

Security for ohlcobject 1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page