Skip to main content

A lightweight helper package for data science and analysis tasks

Project description

DSHelperTool

A lightweight helper package for data science and analysis tasks. DSHelperTool aims to reduce the hassle of common data analysis tasks by 80-90% with simple, intuitive functions.

Installation

pip install dshelpertool

Features

  • Quick Data Overview: Get a comprehensive summary of your DataFrame with a single function call
  • Data Cleaning: Easily standardize column names, handle missing values, and fix data types
  • Exploratory Data Analysis: Analyze distributions, correlations, and patterns in your data
  • Visualization: Create informative plots with minimal code
  • Data Type Handling: Convert columns to appropriate data types with smart error handling

Usage Examples

Quick Overview of a DataFrame

import pandas as pd
from dshelpertool import overview as ov

# Load your data
df = pd.read_csv("your_data.csv")

# Get a comprehensive overview
ov.quick_look(df, name="My Dataset")

Clean Column Names

from dshelpertool import cleaning as cl

# Standardize all column names (lowercase with underscores)
df = cl.update_col(df, standardize_col=True)

# Or rename specific columns
df = cl.update_col(df, rename_dict={"Old Name": "new_name", "Another Column": "another_column"})

Handle Data Types

from dshelpertool import dtypes as dt

# Convert columns to numeric
df = dt.to_numeric_cols(df, ["quantity", "price", "amount"])

# Convert columns to datetime
df = dt.to_datetime_cols(df, "transaction_date")

Analyze Categorical Data

from dshelpertool import overview as ov

# Get value counts for all categorical columns
result = ov.value_counts_all(df, top_n=5)

# Visualize the distributions
ov.plot_value_counts(df, columns=["category", "status"], top_n=5)

Check for Skewness

from dshelpertool import eda

# Check skewness of numeric columns
eda.check_skew(df, cols=["price", "quantity"])

# Visualize the distributions
eda.plot_skew(df, cols=["price", "quantity"])

Development

Setting up the Development Environment

# Clone the repository
git clone https://github.com/uumap/dshelpertool.git
cd dshelpertool

# Install in development mode with development dependencies
pip install -e .[dev]

# Run tests
python -m pytest

GitHub Actions Workflows

This project uses GitHub Actions for continuous integration and deployment:

  1. Python Tests (python-test.yml): Runs on every push to main and pull request

    • Runs tests on multiple Python versions
    • Performs linting with flake8
    • Checks code formatting with black
    • Checks import order with isort
    • Reports test coverage
  2. Publish Python Package (python-publish.yml): Runs when a new release is created

    • Tests the package on multiple Python versions
    • Builds the package
    • Publishes to PyPI

To manually trigger the test workflow, go to the Actions tab in your GitHub repository and select "Python Tests" workflow, then click "Run workflow".

Contributing

Contributions are welcome! Here's how you can contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run the tests (pytest)
  5. Commit your changes (git commit -m 'Add some amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

dshelpertool-0.1.0.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dshelpertool-0.1.0-py3-none-any.whl (37.7 kB view details)

Uploaded Python 3

File details

Details for the file dshelpertool-0.1.0.tar.gz.

File metadata

  • Download URL: dshelpertool-0.1.0.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for dshelpertool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 755ec0d31b845e8722c75ce80dbeb9c09cef9b5fbc730076ffb0fbceeea26191
MD5 61f807d7a01242042e9a5889f97e8d56
BLAKE2b-256 705d83f32506315b111f065b388ddaed08f473fbdb2631978631e5cb0365eac2

See more details on using hashes here.

File details

Details for the file dshelpertool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dshelpertool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for dshelpertool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a5e812666e11c8208e10ecfe7395ff7c4af980db3f344060e7eed3387803021
MD5 7a2e06069b69a67f52d54915aba37b64
BLAKE2b-256 fe39fa5b87c4c5f80cdb9f4678b359ac911a1c53d5a7e1befef2bc74bbfb056a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page