A pandas extension package for enhanced data manipulation and analysis
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pardos-0.0.1.tar.gz.
File metadata
- Download URL: pardos-0.0.1.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04ca47e9ff540a4a5c272946425523cae3ff63b351410f2a0bce5c6615d49e76
|
|
| MD5 |
ac35ecddb2a0b240e24baf78a814e40a
|
|
| BLAKE2b-256 |
15e4eda5e5c6a8eeacfe0d3971ee6b66b30eafc0f27c6cc24eb7deaf360bfc8a
|
File details
Details for the file pardos-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pardos-0.0.1-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3a22a8ca078fdf26d22d15c4a3d54097720e7056dc96fc59cbd8a9d196f3ea8
|
|
| MD5 |
ee3eb844f5afa76ad62facb69661fc5d
|
|
| BLAKE2b-256 |
69c5e70a45df42434b17f3a6305135e9a91e2849e6fc0eaba066e2b61e10e159
|