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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdpatch-0.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 c80748ded09bcc6d3a5d55267fdf223dac7fe29049f00e58b19da53bf0ebbc3d
MD5 aff9bbcad62c74d58eeb72f5c18d083e
BLAKE2b-256 1d37e450b6bdf93ae2bbe97a144543841dce27154fae88d2462232af9315ee4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdpatch-0.0.8-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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6c412f99ccd3cfc80ad3b4b64eb3fcb0cebd19a7dad3b824f7c416d73aa2db0a
MD5 c6c47f50e873c43ff80f31fd7e6bdd36
BLAKE2b-256 edc3651e6ff8223afefbb93ea837185a63c6311d67f46fbcdc97cc58458573d8

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