scitex-pd
Pandas helpers — coerce, reshape, find p-values, merge/melt columns, sort/slice/round.
Full Documentation · uv pip install scitex-pd[all]
Problem and Solution
| # | Problem | Solution |
|---|---|---|
| 1 | Reshape boilerplate — coercing dicts/Series/lists into DataFrames and locating p-value columns repeats everywhere. | Coercion helpers (force_df, from_xyz/to_xy, find_pval) with sensible defaults. |
| 2 | Column ops drift — every project re-implements rename / reorder / round / merge for stats tables. | Uniform helpers (merge_columns, mv, round, replace, sort, slice) — DataFrame in, DataFrame out. |
Quick Start
import scitex_pd as pd_
pd_.force_df(data) # Coerce dict / Series / list / scalar → DataFrame
pd_.from_xyz(df, x, y, z) # Long → wide pivot
pd_.to_xy(df) # Wide → long
pd_.find_pval(df) # Locate p-value columns
Demo
flowchart LR
raw["dict / Series / list / scalar"] --> force["force_df"]
force --> df[(DataFrame)]
df --> reshape["from_xyz / to_xy / melt_cols"]
df --> inspect["find_pval / get_unique"]
df --> transform["round / replace / sort / slice / mv"]
reshape --> out[(reshaped DataFrame)]
inspect --> out2[("p-value columns / uniques")]
transform --> out3[(transformed DataFrame)]
Figure 1. Data flow: coerce anything tabular into a DataFrame, then reshape, inspect, or transform it.
Installation
uv pip install "scitex-pd[all]"
Requires Python ≥ 3.9.
Per-extra installs
| Extra | Pulls in |
|---|---|
dev |
tests + lint + dev helpers (pytest, ruff, scitex-dev, …) |
docs |
Sphinx docs build (sphinx, myst-parser, …) |
Architecture
flowchart LR
raw["dict / Series / list"] --> force["force_df: coerce"]
force --> df[(DataFrame)]
df --> conv["_convert: from_xyz / to_xy / to_xyz"]
df --> find["_find_pval / _find_indi / _get_unique"]
df --> col["_merge_columns / _melt_cols / _mv"]
df --> tr["_replace / _round / _slice / _sort"]
conv --> out[(DataFrame out)]
find --> out
col --> out
tr --> out
Figure 2. Module layout: one helper per file, all DataFrame-in / DataFrame-out around a shared core.
scitex-pd is a thin layer on top of pandas + numpy; the only
non-stdlib dep beyond those is scitex-types (for is_listed_X).
1 Interfaces
Python API
import scitex_pd as pd_
# Coerce / convert
pd_.force_df(data)
pd_.from_xyz(df, x, y, z)
pd_.to_xy(df)
pd_.to_xyz(df)
pd_.to_numeric(df)
# Find / inspect
pd_.find_pval(df)
pd_.find_indi(df, mask)
pd_.get_unique(df, "col")
# Reshape / restructure
pd_.merge_columns(df, [...], "out")
pd_.melt_cols(df, [...])
pd_.mv(df, col, position=-1)
# Transform
pd_.replace(df, mapping)
pd_.round(df, ndigits=2)
pd_.slice(df, ...)
pd_.sort(df, ...)
# Warnings
pd_.ignore_setting_with_copy_warning()
Demo
flowchart LR
raw["dict / Series / list / scalar"] --> force["force_df"]
force --> df[(DataFrame)]
df --> reshape["from_xyz / to_xy / melt_cols"]
df --> inspect["find_pval / get_unique"]
df --> transform["round / replace / sort / slice / mv"]
reshape --> out[(reshaped DataFrame)]
inspect --> out2[("p-value columns / uniques")]
transform --> out3[(transformed DataFrame)]
Figure 3. End-to-end flow: coerce → reshape / inspect / transform → analysis-ready tables.
Quick Start
import scitex_pd as pd_
pd_.force_df(data) # Coerce dict / Series / list / scalar → DataFrame
pd_.from_xyz(df, x, y, z) # Long → wide pivot
pd_.to_xy(df) # Wide → long
pd_.find_pval(df) # Locate p-value columns
Status
Standalone fork of scitex.pd. Deps: numpy, pandas, scitex-types (for is_listed_X).
The umbrella package's scitex.pd import path is preserved via a
sys.modules-alias bridge.
Part of SciTeX
scitex-pd is part of SciTeX. Install via
the umbrella with pip install scitex[pd] to use as
scitex.pd (Python) or scitex pd ... (CLI).
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
License
AGPL-3.0-only (see LICENSE).
Metadata
Release files for scitex-pd 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scitex_pd-0.1.8.tar.gz | 35.7 kB | Without provenance | Details for scitex_pd-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scitex_pd-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for scitex_pd-0.1.8-py3-none-any.whl |
Total release size: 76.7 kB
Release files / scitex_pd-0.1.8.tar.gz
| Download URL | scitex_pd-0.1.8.tar.gz |
|---|---|
| Size | 35.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff75854c8e12c53b0767496cc729ebb2624e5265b8abd3b40947ef1454daec87
|
|
BLAKE2b-256 checksum How to use checksums |
308aea0812a4348b38c0cf55f98a108a513c59988a7dbcf626ea245d75b68166
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / scitex_pd-0.1.8-py3-none-any.whl
| Download URL | scitex_pd-0.1.8-py3-none-any.whl |
|---|---|
| Size | 41.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd1ec9455d1c64bb175be8f2b127ea72acd48a12f9f98d8444f5c1f2b41c7d7d
|
|
BLAKE2b-256 checksum How to use checksums |
88f5b596d637829d0d127428652a11e0998c8cb8fd9bde22d376281346132afc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for scitex-pd 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.