pardos: Quality of Life extensions for pandas
pardos is a Python package that extends the functionality of pandas, providing additional methods for enhanced data manipulation and analysis. It aims to simplify common data operations and introduce new features to make working with pandas DataFrames and Series more efficient and intuitive.
Methods are provided as custom accessors or directly added as methods for DataFrames and Series, allowing you to perform operations directly on your data without the need for additional functions or libraries.
Features
- Custom accessors for DataFrames and Series
- Additional data manipulation methods
- Time-based operations
- Unix-like file operations on paths stored in Series
- Human-readable time parsing
Installation
You can install pardos using pip:
pip install pardos
Usage
To use pardos, simply import it after importing pandas:
import pandas as pd
import pardos
Now you can use the additional methods and accessors provided by pardos on your pandas DataFrames and Series.
Examples
Select rows based on column values
df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]})
result = df.select(A=2)
Add a new column based on existing ones
def new_column(A, B):
return A + B
df.augment(new_column)
Remove constant columns
df = df.drop_constant()
Use human-readable time parsing
df["date"] = pd.to_datetime(df["date"])
recent = df[df["date"].hdt.within("2d")] # Rows within the last 2 days
Perform Unix-like operations on file paths
file_paths = pd.Series(["/path/to/file1.txt", "/path/to/file2.txt"])
file_paths.unix.cp("/new/directory")
Contributing
Contributions to pardos are welcome! Please feel free to submit a Pull Request.
Metadata
Release files for pardos 0.0.1
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 |
|---|---|---|---|---|
| pardos-0.0.1.tar.gz | 20.9 kB | Without provenance | Details for pardos-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pardos-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for pardos-0.0.1-py3-none-any.whl |
Total release size: 38.6 kB
Release files / pardos-0.0.1.tar.gz
| Download URL | pardos-0.0.1.tar.gz |
|---|---|
| Size | 20.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04ca47e9ff540a4a5c272946425523cae3ff63b351410f2a0bce5c6615d49e76
|
|
BLAKE2b-256 checksum How to use checksums |
15e4eda5e5c6a8eeacfe0d3971ee6b66b30eafc0f27c6cc24eb7deaf360bfc8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Release files / pardos-0.0.1-py3-none-any.whl
| Download URL | pardos-0.0.1-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3a22a8ca078fdf26d22d15c4a3d54097720e7056dc96fc59cbd8a9d196f3ea8
|
|
BLAKE2b-256 checksum How to use checksums |
69c5e70a45df42434b17f3a6305135e9a91e2849e6fc0eaba066e2b61e10e159
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.5
|
Security for pardos 0.0.1
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.