Skip to main content

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)

Source distribution for pardos 0.0.1
File Size Uploaded
pardos-0.0.1.tar.gz 20.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pardos 0.0.1
File Interpreter ABI Platform
pardos-0.0.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page