Skip to main content

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()

Alt Text

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

Uploaded Source

Built Distribution

pdpatch-0.0.7-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdpatch-0.0.7.tar.gz
Algorithm Hash digest
SHA256 ec196bc5992351715aca484298cd14ac56728d01f438b144c5a5488ca07bb42e
MD5 a451228a10a4b89ebdfdc84560518af8
BLAKE2b-256 9f84353cd3c75cedd4a543b70ce8e4b0ac30e61f332c054bb95a286a95ae39ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdpatch-0.0.7-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

Hashes for pdpatch-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 84c024433cb1148eee7bb353a047739b2812b5d7ab80f40d80e62e1a4d20ab19
MD5 2e5abf040befb95f396f5d0bbbe4863d
BLAKE2b-256 a819988b6399eee30674999d82f956dc751ae36dec0ec4bcdce70b41e7ebc6e0

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