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:
-
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
-
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:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run the tests (
pytest) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
755ec0d31b845e8722c75ce80dbeb9c09cef9b5fbc730076ffb0fbceeea26191
|
|
| MD5 |
61f807d7a01242042e9a5889f97e8d56
|
|
| BLAKE2b-256 |
705d83f32506315b111f065b388ddaed08f473fbdb2631978631e5cb0365eac2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a5e812666e11c8208e10ecfe7395ff7c4af980db3f344060e7eed3387803021
|
|
| MD5 |
7a2e06069b69a67f52d54915aba37b64
|
|
| BLAKE2b-256 |
fe39fa5b87c4c5f80cdb9f4678b359ac911a1c53d5a7e1befef2bc74bbfb056a
|