Methods for pandas DataFrame and Series.
Project description
pdpatch
New methods for pandas DataFrame and Series.
Install
pip install pdpatch
How to use
from pdpatch.core import *
Utility functions
df = dummydf()
df
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| col_1 | col_2 | |
|---|---|---|
| 0 | 100 | a |
| 1 | 101 | b |
| 2 | 102 | c |
| 3 | 103 | d |
| 4 | 104 | e |
Interactive Method .less()
Shorter methods
df.rename(columns={'col_1': 'new_name'})->df.renamec({'col_1': 'new_name'})
df.renamec({'col_1': 'new_name'})
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
| 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)
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
pdpatch-0.0.9.tar.gz
(8.3 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
File details
Details for the file pdpatch-0.0.9.tar.gz.
File metadata
- Download URL: pdpatch-0.0.9.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8365fa3347801b7e945be19f91e698d1ab368bb02bd031c86b213bb8a44d358d
|
|
| MD5 |
bcba107b1cef4d2fd69cd2d468bc1b50
|
|
| BLAKE2b-256 |
7886d7f35bc6089d52d5482b5b640fa64d49855f2f8e3e98b4c35ee59194105a
|
File details
Details for the file pdpatch-0.0.9-py3-none-any.whl.
File metadata
- Download URL: pdpatch-0.0.9-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b92f8f77bc681b3ba1a339568ff932596fc10d9fa7cababb5b4fe1a4a0fc2d1c
|
|
| MD5 |
dbe030900855043b0c08a88b99bf3af8
|
|
| BLAKE2b-256 |
cb95ee59875335a1db89f164ea1e72bb4e9ffb88a9bf916fba3b0da3743abf38
|