Sympa
Symbolic math for pandas.
Description
Links symbolic expressions created using sympy to columns of data in pandas DataFrames. Any expression created with sympy, which can be “lambdified”, will/should/might work.
Warning
The API design for sympa is subject to change, depending on feedback, if any.
Usage
from pandas import DataFrame
from sympy import symbols
from sympa import domath
df = pd.DataFrame({'x' : [1,2,3,4] * 2, 'y' : [0.1, 0.2] * 4)
# Notice x_-1 and x_-2 are used to reference x @ t=-1, and x @ t=-2.
x, xn1, xn2, y = symbols('x x_-1 x_-2 y')
f = 3.0 * x ** 3 + 2.0 * xn1 ** 2 + xn2 + (y * 2) / 2
df['f'] = domath(df,f)
Docs
For now, there isn’t much documentation. I think it’s pretty straightforward. Check out the /doc folder of the repo on github for more examples.
Requirements
Sympy >= 0.7.6 but should work with much older versions (untested).
Pandas >= 0.15 but should work with much older versions (untested).
Python
Works on 2.7, untested on all other versions. It is expected to be ported to 3.4 soon, and likely 2.6 as well.
Install
pip install sympa
Metadata
Release files for sympa 0.1.0
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 |
|---|---|---|---|---|
| sympa-0.1.0.zip | 5.4 kB | Without provenance | Details for sympa-0.1.0.zip |
Release files / sympa-0.1.0.zip
| Download URL | sympa-0.1.0.zip |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f6f152f32eeff59b978205fe99511504e9653c0a76594e3377333c8cd5cfb85c
|
|
BLAKE2b-256 checksum How to use checksums |
b769ef5747f41ad883d8ee9f64573d25a2f6f829552d797132e8b4523c3cfd2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for sympa 0.1.0
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.