Skip to main content

Cmotions Dataexplore

cmo_dataexplore is a Python library created by The Analytics Lab, which is powered by Cmotions. This library makes it easy for us to explore a new dataset and create nice and insightful graphs along the way. Nothing fancy, but very useful for our consultants. Mostly since this package is used in other packages, which makes our workflow simpler and more efficient.

Since we love to share what we do, why not also do that with our packages, that is why we've decided to make (almost) all of our packages open source, this way we hope to give back to the community that brings us so much. Enjoy!

Installation

Install cmo_dataexplore using pip

pip install cmo-dataexplore

Usage

import cmo_dataexplore as cdx
import cmo_dataviz as cdv
from cmo_dataexplore.resources import get_data_path
import pandas as pd
import matplotlib.pyplot as plt

# retrieve data
df = pd.read_csv(get_data_path("example.csv"))

# init the Explore object
ex = cdx.explore(data=df, dependent_var="Quit_yn", verbose=True)
# if there are records with missings in the dependent variable, these will be removed
# if there are columns that are completely empty, these will be removed
# also if the dependent variable is numeric, this will be changed to string

# list all columns with missing values
ex.retrieve_columns_with_missings()

# get all statistics of the entire dataframe
ex.data_stats()

# check out the number of unique values of each non-numeric variable
ex.categories_counter()

# identify all columns that have Near-Zero Variance (the dependent variable is automatically excluded)
nzv_df, nzv_cols = ex.calculate_NZV(frequency_ratio_thresh=95/5, percentage_unique_thresh=10, verbose=True)
nzv_cols

# mutual information score
ex.calculate_MI_scores(plot=False, ax=None)

# predictive power score for the target variable
ex.calculate_PPS_target(plot=False, ax=None)

# use the predictive power score to find relationships in the data
ex.calculate_PPS(plot=False, ax=None)

# retrieve all columns with a correlation higher than your prefered threshold
ex.retrieve_columns_highly_correlated(corr_thresh=.8)

# create all histograms at once
# this excludes columns with more than 'max_categories' categories
ex.show_hists(nr_plot_cols=4, color_by=ex.dependent_var, bins=10, max_categories=50, plotsize=(15,15))

# create all relation plots at once
# this excludes columns with more than 'max_categories' categories
ex.show_relations(bins=10, max_categories=50, nr_plot_cols=3)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.

License

GNU General Public License v3.0

Contributors

Jeanine Schoonemann
Contact us

Metadata

Release files for cmo-dataexplore 0.0.1

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

Source distribution (sdist)

Source distribution for cmo-dataexplore 0.0.1
File Size Uploaded Provenance Actions
cmo_dataexplore-0.0.1.tar.gz 811.6 kB Without provenance Details for cmo_dataexplore-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmo-dataexplore 0.0.1
File Interpreter ABI Platform Actions
cmo_dataexplore-0.0.1-py3-none-any.whl Python 3 none any Details for cmo_dataexplore-0.0.1-py3-none-any.whl

Total release size: 1.6 MB

Release files / cmo_dataexplore-0.0.1.tar.gz

Download URL cmo_dataexplore-0.0.1.tar.gz
Size 811.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c76c495495c1527a7e6b88efe9bbba06e2e1284040c8ed3ad09d25f9e6dcd71b
BLAKE2b-256 checksum
How to use checksums
625d7a8aa1cd4cda18cefe11f01709f3b9868669867ea52ddb5497d431fa533d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Release files / cmo_dataexplore-0.0.1-py3-none-any.whl

Download URL cmo_dataexplore-0.0.1-py3-none-any.whl
Size 811.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7b2cb8b266b70fba6413866128f234d98eef475316c9f6d689da788e13b3156
BLAKE2b-256 checksum
How to use checksums
7892bd6c3fb7e6ee93f1ef44cada400f42114aeb463503c58791d71828e26457
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.1

Security for cmo-dataexplore 0.0.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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