Skip to main content

New methods for pandas DataFrame and Series.

Project description

pdpatch

pdpatch adds methods to pandas’ DataFrame and Series for a faster data science pipeline. It also defines drop-in replacements for seaborn and plotly.express that automatically label axes with nicer titles.

Install

pip install pdpatch

How to use

from pdpatch.all import *

Interactive Method .less()

Alt Text

Automatically Rename snake_case columns in plotly.express

import pandas as pd
from pdpatch.express import *
df = pd.DataFrame({'time__s__': range(10), 'position__m__': range(10)})
px.scatter(df, x='time__s__', y='position__m__').show('png')

Shorter methods

df.rename(columns={'col_1': 'new_name'})->df.renamec({'col_1': 'new_name'})

df = dummydf()
df.renamec({'col_1': 'new_name'}).to_html()
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)

Utility functions

df = dummydf()
df.to_html()
col_1 col_2
0 100 a
1 101 b
2 102 c
3 103 d
4 104 e

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

Uploaded Source

Built Distribution

pdpatch-0.1.3-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdpatch-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8976f227ddc3667ac342540d7a9df6ee52cce7696c600c67405a6dedb984fe40
MD5 31ec8f6ed2786357ec0dbbb5afe6bd6e
BLAKE2b-256 4017b189490264b12ce5eb0fcbc0a4bdeefaac1342721d9e8dcb002b612d5d5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdpatch-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.0 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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8241a35c9ea480310ab11202452d741a4f4eb160fedd67311bb8a3f2afad1ae7
MD5 1bd29e6503a30c2b907c03047c1c634d
BLAKE2b-256 8be4736a492b3a6089cdd6344dbd9739999947f78e37be06927fc55a80bf6e4d

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