Skip to main content

PtDa

Python package for data analytics.

The package provides:

  • WOE calculation
  • IV calculation
  • Numeric and categorical check
  • etc

How to get it?

Binary installers for the latest released version are available at the Python package index.

# with PyPi 
pip install ptda

The source code is hosted on Github:

https://github.com/luckyp71/ptda

Dependencies

  • Pandas
  • Numpy
  • Scipy

Example

The following code is the example on how to use ptda. In this example, we use UCI Credit Card dataset.

Load Librares and Data

load_lib_data

Check Target Variable Name

Please bear in mind that we need to rename our target variable into target. Luckily in UCI Credit Card dataset we used in this example, the target variable name is already target, hence we don't need make any changes. check_target_var_name

Numeric and Categorical Variable Check

This method will return dataframe which contains numeric_var and categorical_var fields. Those fields are used to inform us whether the particular feature/variable is numeric or categorical, 1 for yes and 0 for no.

How does it work?
What if we have categorical feature that has many unique values, let say 15?

Well the cn_df method has one optional argument, i.e. n_bin, so if you have many unique values in your categorical feature/var, you can pass that unique values count as n_bin in the cn_df method (the default of n_bin is 10). num_cat_check

WOE and IV Calculation

woe_iv is a method to calculate WOE and IV as well as generating dataframe which contains those two information. woe_iv_calculation

iv_result

Metadata

Release files for PtDa 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PtDa 0.1.5
File Size Uploaded Provenance
PtDa-0.1.5.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for PtDa 0.1.5
File Interpreter ABI Platform
PtDa-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / PtDa-0.1.5.tar.gz

Download URL PtDa-0.1.5.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b94154a5c0309045d92b549c52f5f60ab8114f7ae9b264064f8fb7d7cbfc4b26
BLAKE2b-256 checksum
How to use checksums
fc93a0ffe6aa74ab5902838ca76bbb3319ab26335aabcf53c4b0d542044032cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.4

Release files / PtDa-0.1.5-py3-none-any.whl

Download URL PtDa-0.1.5-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8804d14052f64b0dd255f6a1f0e8e653d5dc275b6620e6238aec6982c707be19
BLAKE2b-256 checksum
How to use checksums
481519472a885834478046b801dab340e5b6a4cb403ac4a42aa18ddc7d0c3a15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.4

Security for PtDa 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page