Skip to main content

Methods for pandas DataFrame and Series.

Project description

pdpatch

New methods for pandas DataFrame and Series.

Install

git clone cd pdpatch pip install -e .

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

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


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.5.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

pdpatch-0.0.5-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pdpatch-0.0.5.tar.gz.

File metadata

  • Download URL: pdpatch-0.0.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for pdpatch-0.0.5.tar.gz
Algorithm Hash digest
SHA256 6c578170a160b0b4f2ebe669e211a570a46072ba0dc604f0c39e732ed61bd229
MD5 59a623b77f99aa935a3f988a478157e8
BLAKE2b-256 462e1f418691ed9498f06047b8a98351a7f5dcddce57438c7595d290bf4e93be

See more details on using hashes here.

File details

Details for the file pdpatch-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: pdpatch-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for pdpatch-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 17f8a12db61638157c8f5cc756d7793a9037e4d17e01d31591d25a4087490f6a
MD5 40f393fc7f190b4cd5ed2c7444d14d13
BLAKE2b-256 6479bfc647f46105d84b551d88e0c87e510a4270057a4050607932b2e868c673

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page