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

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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