Skip to main content

An extension of pandas for efficient representation of nested associated datasets.

Project description

nested-pandas

Template

PyPI Conda

GitHub Workflow Status codecov Read the Docs benchmarks

An extension of pandas for efficient representation of nested associated datasets.

Nested-Pandas extends the pandas package with tooling and support for nested dataframes packed into values of top-level dataframe columns. Pyarrow is used internally to aid in scalability and performance.

Nested-Pandas allows data like this:

pandas dataframes

To instead be represented like this:

nestedframe

Where the nested data is represented as nested dataframes:

   # Each row of "object_nf" now has it's own sub-dataframe of matched rows from "source_df"
   object_nf.loc[0]["nested_sources"]

sub-dataframe

Allowing powerful and straightforward operations, like:

   # Compute the mean flux for each row of "object_nf"
   import numpy as np
   object_nf.reduce(np.mean, "nested_sources.flux")

using reduce

Nested-Pandas is motivated by time-domain astronomy use cases, where we see typically two levels of information, information about astronomical objects and then an associated set of N measurements of those objects. Nested-Pandas offers a performant and memory-efficient package for working with these types of datasets.

Core advantages being:

  • hierarchical column access
  • efficient packing of nested information into inputs to custom user functions
  • avoiding costly groupby operations

This is a LINCC Frameworks project - find more information about LINCC Frameworks here.

Acknowledgements

This project is supported by Schmidt Sciences.

Project details


Download files

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

Source Distribution

nested_pandas-0.4.9.tar.gz (485.9 kB view details)

Uploaded Source

Built Distribution

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

nested_pandas-0.4.9-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

Details for the file nested_pandas-0.4.9.tar.gz.

File metadata

  • Download URL: nested_pandas-0.4.9.tar.gz
  • Upload date:
  • Size: 485.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nested_pandas-0.4.9.tar.gz
Algorithm Hash digest
SHA256 81c556079cc678d866ba36fba358c4ada389e6de05a4db6179bbc704aa7b43ec
MD5 a992dc1ab9d87513510b344ec64906b9
BLAKE2b-256 0e14d1ff55628e78353752be1d6c17c32ab09493591e056df2bb4728d69fdd9b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nested_pandas-0.4.9.tar.gz:

Publisher: publish-to-pypi.yml on lincc-frameworks/nested-pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nested_pandas-0.4.9-py3-none-any.whl.

File metadata

  • Download URL: nested_pandas-0.4.9-py3-none-any.whl
  • Upload date:
  • Size: 64.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nested_pandas-0.4.9-py3-none-any.whl
Algorithm Hash digest
SHA256 bdda99930fa28f635fd7b2df18a892c8e5ca8117c7dc05b97f86e7d615d25ef8
MD5 d5aa3745d6ce5cd55eb8753452b67ed3
BLAKE2b-256 e0e979bbfb6cc6a2e68b01eb27f9a0621fecb77494caab0015c1242e58e21af6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nested_pandas-0.4.9-py3-none-any.whl:

Publisher: publish-to-pypi.yml on lincc-frameworks/nested-pandas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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