Skip to main content

A Python package for streamlined Exploratory Data Analysis (EDA) and Extraction Transform Load (ETL)

Project description

EDAbyAlex

A Python package for streamlined Exploratory Data Analysis (EDA) with support for various file formats.

Features

  • Flexible Data Loading

    • Support for both CSV and Excel (.xlsx) files
    • Single file loading with automatic sheet detection
    • Multiple file loading with pattern matching
    • Smart Excel sheet handling
  • Comprehensive EDA Tools

    • Quick data preview (first 10 rows)
    • Statistical description of numerical columns
    • Dataset information and structure
    • Column listings
    • Unique value analysis
    • Missing value detection

Installation

pip install edabyalex

Quick Start

from extractor import extractor

# Initialize and load a CSV file
eda = extractor(path="data.csv")
eda.load()
eda.eda()  # Run complete analysis

Detailed Usage

Initialization

from extractor import extractor

# For CSV files
eda = extractor(
    path="path/to/file.csv",  # Required: File path
    file_type=None,           # Optional: Defaults to CSV
    file_query=None           # Optional: For multiple file loading
)

# For Excel files
eda = extractor(
    path="path/to/file.xlsx",
    file_type=".xlsx",
    sheet_name="Sheet1"       # Optional: Sheet name
)

Loading Data

Single File Loading

# Load CSV
eda = extractor(path="data.csv")
df = eda.load()

# Load Excel with specific sheet
eda = extractor(path="data.xlsx", file_type=".xlsx")
df = eda.load(sheet_name="Sheet1")

Multiple File Loading

# Load multiple CSV files
eda = extractor(path="./data/", file_query="2024")
df = eda.load_multiple_csv()

# Load multiple Excel files
eda = extractor(path="./data/", file_query="2024")
df = eda.load_multiple_xlsx()

Exploratory Data Analysis

# Run complete EDA
eda.eda()  # Shows:
           # - Data preview (first 10 rows)
           # - Statistical description
           # - Dataset information
           # - Column list
           # - Unique values
           # - Missing values

# View columns
eda.columns()

# Analyze unique values
eda.print_unique()  # All columns
eda.unique_values(col_name="category")  # Specific column

Data Export

# Export to CSV
eda.export(file_type="csv", file_name="output_data")

# Export to Excel
eda.export(file_type=".xlsx", file_name="output_data")

Error Handling

The package includes comprehensive error handling for common scenarios:

  • File not found
  • Invalid sheet names in Excel files
  • Missing columns
  • Operations on unloaded data

Example:

try:
    eda = extractor(path="data.xlsx", file_type=".xlsx")
    df = eda.load(sheet_name="NonexistentSheet")
except TypeError as e:
    print(f"Sheet error: {e}")

Requirements

  • pandas >= 1.0.0
  • numpy >= 1.18.0
  • openpyxl >= 3.0.0 (for Excel support)

Version History

0.1.2 (updating documentation)

  • Updated README.md

0.1.1 (export feature)

  • Added export functionality
  • Improved package build configuration
  • Enhanced error handling
  • Updated documentation

0.1.0 (Initial Release)

  • Basic EDA functionality
  • Support for CSV and Excel files
  • Data loading and preview features
  • Unique value analysis
  • Missing value detection

License

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

Author

Alex Yang

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

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

edabyalex-0.1.2.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

edabyalex-0.1.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file edabyalex-0.1.2.tar.gz.

File metadata

  • Download URL: edabyalex-0.1.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for edabyalex-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ce1dd3c44fc8f10e4c5db01341c34f6f2ed71524c6b76bb82160a1539e861f82
MD5 101ab01eb45ee0eca53ae006c053459f
BLAKE2b-256 8ce2a1a020571dcf080abe421a5c5fb9597c9747512eb9ca58166d48f2742d42

See more details on using hashes here.

File details

Details for the file edabyalex-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: edabyalex-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for edabyalex-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3573f4078b8ac6a4f25089d3d8dc7bcf884d1a1727a1852123b2f225375ae578
MD5 0423626c51733a2db8c9631d9c7400b7
BLAKE2b-256 05a50c6d2c4cc3c4caf66c22d9e643dd52450d1a32aa95139810af3f4dfb76be

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