Skip to main content

Immutable structures for one- and two-dimensional calculations with labelled axes

Project description

The StaticFrame library defines the Series and Frame, immutable data structures for one- and two-dimensional calculations with self-aligning, labelled axes. StaticFrame meets the need for an immutable, Pandas-like DataFrame with a more strict and consistent interface. StaticFrame is suitable for applications in data science, data engineering, finance, scientific computing, and related fields where reducing opportunities for error by prohibiting mutation is critical.

While many interfaces are similar to Pandas, StaticFrame deviates from Pandas in many ways: all data is immutable, and all indices are unique; the full range of NumPy data types is preserved, and date-time indices use discrete NumPy types; hierarchical indices are seamlessly integrated; and uniform approaches to element, row, and column iteration and function application are provided. Core StaticFrame depends only on NumPy: Pandas is not a dependency.

A wide variety of table storage and representation formats are supported, including input from and output to CSV, TSV, JSON, MessagePack, Excel XLSX, SQLite, HDF5, NumPy, Pandas, Arrow, and Parquet; additionally, output to xarray, HTML, RST, Markdown, and LaTeX is supported, as well as HTML representations in Jupyter notebooks. The Bus, a container of Frames, permits writing to and lazily reading from multi-table storage formats, including zipped pickles, XLSX workbooks, SQLite, and HDF5.

Code: https://github.com/InvestmentSystems/static-frame

Docs: http://static-frame.readthedocs.io

Packages: https://pypi.org/project/static-frame

Benchmarks: https://investmentsystems.github.io/static-frame-benchmark

Context: Ten Reasons to Use StaticFrame instead of Pandas

Why Immutable Data?

The following example, executed in a low-memory environment (using prlimit), shows how Pandas cannot re-label columns of a DataFrame or concatenate a DataFrame to itself without copying underlying data. By using immutable NumPy arrays, StaticFrame can perform these operations in the same low-memory environment. By reusing immutable arrays without copying, StaticFrame can achieve more efficient memory usage.

https://raw.githubusercontent.com/InvestmentSystems/static-frame/master/doc/images/animate-low-memory-ops-verbose.svg

Colorful Types

Unexpected type coercions can expose errors or degrade performance. StaticFrame’s container display provides full visibility into the types in a Frame, and provides a variety of ways to configure the presentation and color of those types.

https://raw.githubusercontent.com/InvestmentSystems/static-frame/master/doc/images/animate-display-config.svg

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

static-frame-0.7.13.tar.gz (422.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

static_frame-0.7.13-py3-none-any.whl (459.8 kB view details)

Uploaded Python 3

File details

Details for the file static-frame-0.7.13.tar.gz.

File metadata

  • Download URL: static-frame-0.7.13.tar.gz
  • Upload date:
  • Size: 422.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

File hashes

Hashes for static-frame-0.7.13.tar.gz
Algorithm Hash digest
SHA256 617ffc372db9eebd2badca3f7f5b924a2c212992277fb90efb6b6c8527b5f075
MD5 0ecd922ecfd81cf8abef89f0f673949f
BLAKE2b-256 9780df794011f933e4901b0351587eea353ba45a66919afe42b5f84253f457e4

See more details on using hashes here.

File details

Details for the file static_frame-0.7.13-py3-none-any.whl.

File metadata

  • Download URL: static_frame-0.7.13-py3-none-any.whl
  • Upload date:
  • Size: 459.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4

File hashes

Hashes for static_frame-0.7.13-py3-none-any.whl
Algorithm Hash digest
SHA256 9e56a77f78846a75f99a07484e0326b82dd2fe4d39a90fdffe601e59f5cd6cc2
MD5 f3ca9099d58d77d36a0040e0612f3911
BLAKE2b-256 4b27d6ce9d3d81777ef5ef5609de32c7ce388543ab5aba80827d5a2f0c58c96f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page