pdpatch
pdpatch adds methods to pandas’ DataFrame and Series for a faster
data science pipeline. It also defines drop-in replacements for
seaborn and plotly.express that automatically label axes with nicer
titles.
Install
pip install pdpatch
How to use
from pdpatch.all import *
Interactive Method .less()
Automatically Rename snake_case columns in plotly.express
import pandas as pd
from pdpatch.express import *
df = pd.DataFrame({'time__s__': range(10), 'position__m__': range(10)})
px.scatter(df, x='time__s__', y='position__m__').show('png')
Shorter methods
df.rename(columns={'col_1': 'new_name'})->df.renamec({'col_1': 'new_name'})
df = dummydf()
df.renamec({'col_1': 'new_name'}).to_html()
| new_name | col_2 | |
|---|---|---|
| 0 | 100 | a |
| 1 | 101 | b |
| 2 | 102 | c |
| 3 | 103 | d |
| 4 | 104 | e |
Functions as methods
df.len()
5
New methods
df.col_1.minmax
(100, 104)
Utility functions
df = dummydf()
df.to_html()
| col_1 | col_2 | |
|---|---|---|
| 0 | 100 | a |
| 1 | 101 | b |
| 2 | 102 | c |
| 3 | 103 | d |
| 4 | 104 | e |
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pdpatch-0.1.2.tar.gz
(12.2 kB
view details)
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
pdpatch-0.1.2-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file pdpatch-0.1.2.tar.gz.
File metadata
- Download URL: pdpatch-0.1.2.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
336988a68cc262df132b726789b5ebebf39be84953d37a93ba66e8e6e80f2f39
|
|
| MD5 |
6be0daa61b26f563d061fd7e02b01aad
|
|
| BLAKE2b-256 |
c337034cbc2a1009b261cc050377f72ec7571d48843cb93cf902d9ab35751444
|
File details
Details for the file pdpatch-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pdpatch-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9485e4a3925f10697bad508680ca2915894e2258ab297725f4806fff31f27d2
|
|
| MD5 |
4b18994e915c545633eb922e8a2516eb
|
|
| BLAKE2b-256 |
bd73bebcae62a1ff6cf21ebdb921fbd7f4572338cf24501c113736fb2aebb2a5
|