Utility Functions, Wrappers for pandas Module
Project description
![favicon](https://pypi-camo.freetls.fastly.net/514348c08aad964dfafc1ecf72757ed4ccc76a29/66617669636f6e2e706e67)
pandas-wizard
Pandas-Wizard (pandaswizard
) is a simple Python module for providing
utility functions and wrappers for the pandas
module. The module is kept simple and use of external dependencies is minimized
unless needed to enhance performance.
This is a relatively new repository, and if you find any performance or improvement scope please check the contributing guidelines for the organization. All help and criticism are appreciated. If you find any additional use cases please create a pull request or submit for a new feature.
Getting Started
The source code is currently hosted at GitHub: sharkutilities/pandas-wizard. The binary installers for the latest release are available at the Python Package Index (PyPI).
pip install -U pandas-wizard
The list of changes between each release is available here.
The purpose of the below guide is to illustrate the main features of pandas-wizard and assume the working knowledge of
the pandas
module and use cases. The below example calculates the percentile of
pandas.DataFrameGroupBy
object using np.percentile
.
import pandaswizard as pdw # attempt to create an ubiquitous naming
# let's calculate the 50th-percentile, i.e. the median for each group
percentiles = df.groupby("group").agg({"A" : pdw.percentile(50)})
percentiles.head()
# or, preferred usage is to use in conjunture with other aggregation function like
statistics = df.groupby("group").agg({"A" : [sum, pdw.percentile(50), pdw.quantile(0.95)]})
statistics.head()
The above function calculates the 50th percentile, i.e., the median of the feature "A" based on the grouped column "group" from the data frame.
Footnote: The favicon is designed from the original pandas
logo and no
copyright infringement is intended. Since the main objective is to provide a utility function for pandas
the logo is re-used and developed
using canva.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pandas_wizard-1.1.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b7c9107998827ea53221e70722f370f0e56710e7690b638544af621143c5501 |
|
MD5 | 7b7549a4a4d62eaec1942d4145dbbbcd |
|
BLAKE2b-256 | 6981c9c8052444a438973b4a223cb4d95a8be4eb64de711ecf7dfa0e4a6aa4b0 |