Skip to main content

csvsdataset

csvsdataset is a Python library designed to simplify the process of working with multiple CSV files as a single dataset. The primary functionality is provided by the CsvsDataset class in the csvsdataset.py module.

This was written by ChatGPT4 as mentioned here. Issues will be cut and paste into a session. It is an experiment in semi-autonomous code maintenance.

Installation

To install the csvsdataset library, simply run:

pip install csvsdataset

Usage

    from csvsdataset.csvsdataset import CsvsDataset
    
    # Initialize the CsvsDataset instance
    dataset = CsvsDataset(folder_path="path/to/your/csv/folder",
                          file_pattern="*.csv",
                          x_columns=["column1", "column2"],
                          y_column="target_column")
    
    # Iterate over the dataset
    for x_data, y_data in dataset:
        # Your processing code here
        pass
    
    # Access a specific item in the dataset
    x_data, y_data = dataset[42]

Memory frugality

Only data from a small number of csv files are maintained in memory. The rest is discarded on a LRU basis. This class is intended for use when a very large number of data files exist which cannot be loaded into memory conveniently.

Metadata

Release files for csvsdataset 0.0.7

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

Source distribution (sdist)

Source distribution for csvsdataset 0.0.7
File Size Uploaded
csvsdataset-0.0.7.tar.gz 35.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for csvsdataset 0.0.7
File Interpreter ABI Platform
csvsdataset-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 70.3 MB

Release files / csvsdataset-0.0.7.tar.gz

Download URL csvsdataset-0.0.7.tar.gz
Size 35.0 MB
Tags Source
SHA-256 checksum
How to use checksums
edbd1b5640a4a904014ed9476ea7ee3f551994a9d125f48d5d64500070c9161d
BLAKE2b-256 checksum
How to use checksums
1cef7259452de864117bed0e0ec17ffc07117b901fe54ad5f5e51f0d8adf85b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release files / csvsdataset-0.0.7-py3-none-any.whl

Download URL csvsdataset-0.0.7-py3-none-any.whl
Size 35.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
151e992427bc6969f52a5f93966b59d32c70fd71166f7b4e48f5b8c39704bcba
BLAKE2b-256 checksum
How to use checksums
5e34610d9451ec9ad9100ea571d6d201e12b8a6594705507c688df053b7d0634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.3

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

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