Skip to main content

Library for handling chemical formulas

Project description

Chela

Chela is a Python library to handle chemical formula.

Installation

Use the package manager pip to install Chela

pip install chela

Usage

From bash:

# Check correctness of chemical formula
python3 -m chela -c CHEMICAL_FORMULA

# Transform a csv file with a column containing the formulas
#into a dataframe with atomic symbols as columns and save it as a csv file
python3 -m chela -d FILE.csv NEW_FILE.csv

From python script:

import chela as cl

# check chemical formula with a function
cl.check_formula(CHEMICAL_FORMULA)

import pandas as pd

# check chemical formula with a pandas extensions
pd.DataFrame().chela.check_formula(CHEMICAL_FORMULA)

# Transform a pandas Dataframe with a column containing the formulas
#into a dataframe with atomic symbols as columns
dataset = pd.read_csv(FILE.csv)
dataframe = cl.build_dataframe(dataset)

dataframe = pd.DataFrame().chela.build_dataframe(dataset)

# Drop formulas contaning elements with atomic number greater than Z
dataframe = dataframe.chela.drop_heavy_elements(Z)

License

MIT

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

chela-1.0.5.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

chela-1.0.5-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file chela-1.0.5.tar.gz.

File metadata

  • Download URL: chela-1.0.5.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.6.9

File hashes

Hashes for chela-1.0.5.tar.gz
Algorithm Hash digest
SHA256 95fdddb0cd5cda0b5a876c91deb7017eeec46fec9c8333fc4d536fd4a4c8baf1
MD5 d01cdde5108adff5ba7a7ccdff1819b8
BLAKE2b-256 a27b04d7219012bc873f805b42522dd261b204ac5db1f7e93869b8b52f7aaa2a

See more details on using hashes here.

File details

Details for the file chela-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: chela-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.6.9

File hashes

Hashes for chela-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1e0623fa63ba15b4882187c333e0425fcd760f438295ec10a4b06347eb945f14
MD5 ed357a3b8902d1facaafe096cc434c59
BLAKE2b-256 fc7336aa8d4f17ecd3bf6e7ce529fded36eb4e9c3c9bd7e972f46e0d6f08cc28

See more details on using hashes here.

Supported by

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