Skip to main content

Tool to rename GHG emissions or concentration names

Project description

GHG Renamer

A Python tool to rename various names used for Greenhouse Gas emissions or concentrations tables to a common naming scheme.

Example:

from ghgrenamer import to_shortname

to_shortname("CO2_emissions")  # => 'CO2'

Example usage:

from ghgrenamer import to_shortname

import pandas as pd

df = pd.read_excel(
    "Supplementary_Table_UoM_GHGConcentrations-1-1-0_annualmeans_v23March2017.xls",
    skiprows=21,
    index_col=0,
    sheet_name=1
)

print([to_shortname(i) for i in df.columns])
"""
['CO2', 'CH4', 'N2O', 'HFC-134a', 'HFC-23', 'HFC-32', 'HFC-125', 'HFC-143a', 'HFC-152a', 'HFC-227ea', 'HFC-236fa', 'HFC-245fa', 'HFC-365mfc', 'HFC-43-10mee', 'NF3',  # ...
"""

Alternative names are defined in names.yaml. Run make to update them into the mappings.py submodule.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ghgrenamer-0.3.0-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ghgrenamer-0.3.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ghgrenamer-0.3.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.3

File hashes

Hashes for ghgrenamer-0.3.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1a8787e3bda115f9c0ebaa7bb0784aec6525e02f1c75dce7d97d55b05b79c544
MD5 766b9a5b401bbae220aeb2657a3566ba
BLAKE2b-256 f136dad800b0edb28c466411f70166833271aaaf7a57c4ce4c0d9e77e2d1abbb

See more details on using hashes here.

Provenance

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