Skip to main content

Transform raw data into insights.

Project description

Pychemist

The Alchemist of Data Science

Transform raw data into insights.

Pychemist is a lightweight Python library designed to simplify and enrich your data science workflow. Inspired by the transformation mindset of an alchemist, it helps you turn raw data into golden insights. Pychemist replaces complex, repetitive code with a clean and intuitive syntax that streamlines data cleaning, transformation, and preparation to reveal clear insights. It also enables clean and well-structured presentation of results, making it easier to communicate findings effectively.


Features

  • Create lagged or lead variables for time-series and panel data
  • Run quick, readable t-tests on treatment groups
  • Filter model summaries to hide fixed effects
  • Conditional mutation of DataFrames
  • Pandas accessor (.pc) for fluent, chainable workflows

Installation

pip install pychemist

Usage

import pychemist as chem

Example 1: Lagging a variable

df = chem.time_shift(dataframe=df, variables=["sales","profit"], id="company", time="year", shift=1)

Example 2: Conditional mutation

df = chem.mutate(df, query_str='division == 24 & managerID==15014', "bonus", 1000)

Example 3: Conditional mutation using the DataFrame accessor

df=df.chem.mutate('company_id == "8ga62sav" & year==2025', "total_assets", 82000000)

Example 4: T-test between treated and control groups

chem.ttest(df, variable="outcome", treatment="treated")

Example 5: Model summary without fixed effects

import statsmodels.formula.api as smf
model = smf.ols("y ~ x + C(firm)", data=df).fit()
print(chem.summary_no_fe(model))

MIT License Copyright (c) Jeroen van Raak (2025)

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

pychemist-0.0.4.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

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

pychemist-0.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pychemist-0.0.4.tar.gz.

File metadata

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

File hashes

Hashes for pychemist-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2ad78660c91d3720af1335a5e14b32b554ba9a8bc0534d1374bb2f1923eb08a2
MD5 f484a034d7f3f38ffd4b8dc4150d445c
BLAKE2b-256 616f46a05af49ac6058dfd8ad647acf717debd775234ec892765a7e8810de428

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychemist-0.0.4.tar.gz:

Publisher: release.yaml on vanraak/pychemist

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

File details

Details for the file pychemist-0.0.4-py3-none-any.whl.

File metadata

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

File hashes

Hashes for pychemist-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6e66d991c0a95d8cbaec9583fff6f623db111fbae3bec53044e8d26b102bc055
MD5 daa277294893a2ca35fa1c92758f1e21
BLAKE2b-256 9fc63250c59c8e6d0bc7b795353409bbe02a9a7e02e5b568d233819b2a5a5e40

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychemist-0.0.4-py3-none-any.whl:

Publisher: release.yaml on vanraak/pychemist

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