Skip to main content

petropandas

Release Build status Commit activity License

Pandas accessors for petrologists

Installation

pip install petropandas

Optional extras

Extra Includes Description
database requests Client for the remote petrodb REST API (petropandas.database)
extra jupyterlab JupyterLab support
tests pytest, nbval Run the test suite
docs mkdocs, ... Build documentation locally
dev all of the above Development setup
pip install petropandas[database]      # basic + database client
pip install petropandas[dev]           # full development setup

Getting started

petropandas provides several pandas.DataFrame accessors to seemlesly integrate common petrological calculations to your Python data analysis workflow.

from petropandas import pd, mindb

For more details check the documentation.

df = pd.read_excel("some/folder/data.xlsx")
df.oxides.molprop()
df.oxides.cations(noxy=12)

df.ree.normalize(reservoir='CI Chondrites', reference='McDonough & Sun 1995')

Database client (optional)

The petropandas.database module provides a client for a remote petrodb REST API. Install the extra and use it alongside the accessors:

pip install petropandas[database]
from petropandas.database import PetroDB

db = PetroDB('http://127.0.0.1:8000', 'user', 'password')
project = db.projects(name="MyProject")
sample = project.samples(name="DB250")
df = sample.spots.df(mineral="Grt")

Download files

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

Source Distribution

petropandas-0.1.4.tar.gz (316.3 kB view details)

Uploaded Source

Built Distribution

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

petropandas-0.1.4-py3-none-any.whl (93.9 kB view details)

Uploaded Python 3

File details

Details for the file petropandas-0.1.4.tar.gz.

File metadata

  • Download URL: petropandas-0.1.4.tar.gz
  • Upload date:
  • Size: 316.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for petropandas-0.1.4.tar.gz
Algorithm Hash digest
SHA256 44c252ae30b60ce5885511f0c3d3984210471245040b0af30731969b81ea54b2
MD5 c6a7f768bb4de2c93ac5bad8f793de1b
BLAKE2b-256 bd8cf61ab475eaca0c5ce0cec10fc96cb0df638cabe903e38087f616cdf2ef1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for petropandas-0.1.4.tar.gz:

Publisher: release.yml on ondrolexa/petropandas

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

File details

Details for the file petropandas-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: petropandas-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 93.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for petropandas-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ec9061fe0611d2f0e445c8a1219e7545dcd5df867997333b5a11065d3d456b09
MD5 4af360b77c3af988ac8ca3f08a44e902
BLAKE2b-256 4787d4bbeb7848fec77b4cd5d24178df968e27b86be5ccc20be7c604fccde2cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for petropandas-0.1.4-py3-none-any.whl:

Publisher: release.yml on ondrolexa/petropandas

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

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

This release

0.1.4 This release

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

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