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

Uploaded Source

Built Distribution

pdpatch-0.0.10-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdpatch-0.0.10.tar.gz
  • Upload date:
  • Size: 8.5 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.10.tar.gz
Algorithm Hash digest
SHA256 79bdd2e73d452299df575d3f09a495eccd8a913aa36b49d896f91162dfedc08d
MD5 7520daebd37962bac7b05a13f4de2974
BLAKE2b-256 113af4f4658d6c2c384a866ba900a0777f0390bb8c1b15f25ca6f7804215c7f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdpatch-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 6.5 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 141ca7199e481981a3b5f675c8c9af5ac73d17443c558c06eab9cf08708af0bc
MD5 68c684065ce30c6f02aab2b8fb639bed
BLAKE2b-256 feed48bbde5d0facbbcab050a51e39d733944d87616703f67b5e8fd9a71a6ad0

See more details on using hashes here.

Supported by

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