Skip to main content

A Python module for loading and managing canonical data files with standardized naming conventions

Project description

Canonical Loader

A Python module for loading and managing canonical data files with standardized naming conventions. This package provides utilities for extracting metadata from file names, loading data from various file formats, and maintaining data canonicality.

Features

  • Standardized file naming convention support
  • Automatic date extraction from file names
  • Support for CSV and Excel file formats
  • Data transformation between DataFrame and dictionary formats
  • Metadata extraction and management
  • Canonical data saving with consistent formatting

Installation

pip install canonical-loader

Quick Start

from canonical_loader import CanonicalLoader

# Initialize loader with regex pattern and folder path
loader = CanonicalLoader(regex="dataset-menu.*\\.csv", file_folder="./dataset-canon")

# Access loaded data
df = loader.get_df()
data = loader.get_data()
metadata = loader.get_meta_data()

# Save data in canonical format
loader.save_data_as_df()

File Naming Convention

The package supports the following file naming patterns:

  • dataset-{name}-at{date_ref}-save{date_save}.{extension} - Single date reference
  • dataset-{name}-from{start_date}-to{end_date}-save{date_save}.{extension} - Date range
  • dataset-{name}-between{initial_date}-and{final_date}-save{date_save}.{extension} - Date interval

Requirements

  • Python >= 3.6
  • shining_pebbles >= 0.5.3
  • string_date_controller >= 0.1.3
  • tqdm

Version History

0.1.0 (2025-04-18)

  • Initial release
  • Basic file loading and metadata extraction
  • Support for CSV and Excel files
  • Canonical data transformation and saving

License

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

Author

June Young Park
AI Management Development Team Lead & Quant Strategist at LIFE Asset Management

LIFE Asset Management is a hedge fund management firm that integrates value investing and engagement strategies with quantitative approaches and financial technology, headquartered in Seoul, South Korea.

Contact

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

canonical_loader-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

canonical_loader-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for canonical_loader-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8bc4a3ff8bcad0d5a11052223faa7e32d666576014a8a261cb3b6504b587a21
MD5 4e97e66298934f406f2be77bd1305f21
BLAKE2b-256 a56aecfd7ce6ddc7306a094e0066b5dbf4f87c05c35bb31959c8c20856c68eb8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for canonical_loader-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7315aa100a7636be60f79240ad4e6d98b7e7a5fb99ce63411fb80e303d1b6a17
MD5 dfdfba189ae7c8a9a856614761cdc6f4
BLAKE2b-256 b78e65c2ff53018a2776c79642927da3417d81a051b8cd0f892a04703129e0bb

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