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 pc

Example 1: Lagging a variable

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

Example 2: Conditional mutation

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

Example 3: Conditional mutation using the DataFrame accessor

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

Example 4: T-test between treated and control groups

pc.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(pc.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.3.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.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pychemist-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 0b178608685fe4ef4195755c1e14e843c77906c47b15bcd32c06cbd546e23c36
MD5 7143fe3ccf9a4e86ec45ce14372ac86c
BLAKE2b-256 c3884b13462e01601f4f9f50440a2c478e81244256e0ac1e29df8577d1645a68

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychemist-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: pychemist-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9dbd13bb3ae12c31455e4bb8669254a963df33efb6f7fa13051c5bb0ae68b685
MD5 7695f9b8cf8a78017d5855e0444eb3cb
BLAKE2b-256 ed47988b7197a540f776e8438837858db9c9bedc5f39dbd77cc05c9ab7dc8d3d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychemist-0.0.3-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