Skip to main content

New methods for pandas DataFrame and Series.

Project description

pdpatch

pdpatch adds methods to pandasDataFrame 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. We use nbdev to build this project.

Install

pip install pdpatch

How to use

from pdpatch.all import *

Interactive Method .less()

Alt Text

Automatically Rename snake_case columns in plotly.express and seaborn

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

from pdpatch.seaborn import sns
sns.scatterplot(data=df, x='time__s__', y='position__m__');

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

Uploaded Source

Built Distribution

pdpatch-0.1.7-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdpatch-0.1.7.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for pdpatch-0.1.7.tar.gz
Algorithm Hash digest
SHA256 8659e44eb14f8e87c9c4bbaf79b35792abc75753a4bf6ed562f1ee80f1bb7f2d
MD5 f6b82f1dd3dccc8d78b650587b2b3ad8
BLAKE2b-256 5ba4c5b6e46b741d6ad58fecd09820dfa591ef304f6907d723c35e61a8ab5049

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdpatch-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for pdpatch-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6690a1ca60376b3c498dd7496c08252fa37b277246c9c2c1f583283a32e4874d
MD5 1b7b1f68fcdeb489385b2d43ea949c71
BLAKE2b-256 1a8340daa91a554d31696751eaf80d3da3c12e84d055083345567bc4255de039

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