Skip to main content

A library for remapping CSV files based on a mapping file.

Project description

CSV Remapper

CSV Remapper is a powerful Python library designed to easily transform and manipulate CSV files using customizable mapping files. Streamline your data workflows and automate common CSV cleaning and transformation tasks.

Key Features

  • Rename columns: Effortlessly rename columns based on your mapping rules.
  • Remove columns: Delete specific columns by key to clean your data.
  • Merge columns: Combine values from multiple columns, choosing the order and separator.
  • Convert values to positive: Transform numeric values to their absolute value by key.
  • Convert values to negative: Transform numeric values to negative by key.
  • Normalize dates: Standardize date formats in selected columns.

Why use CSV Remapper?

  • Easy to use: Intuitive API and clear documentation.
  • Flexible: Adapt CSV transformations to any workflow.
  • Automatable: Perfect for data pipelines and batch processing.
  • Open Source: Community-maintained and open source.

Installation

pip install csv-remapper-lib

Usage Example

from csv_remapper_lib import CsvRemapper

csv = CsvRemapper("data.csv")
csv.rename_key("example_key", "new_key")
csv.save("data.csv")

Contributing

Contributions are welcome! See the CONTRIBUTING.md file for more information.


License

This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE file for details.

Keywords: csv, python, data transformation, data cleaning, csv processing, automation, data engineering

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

csv_remapper_lib-1.0.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

csv_remapper_lib-1.0.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file csv_remapper_lib-1.0.0.tar.gz.

File metadata

  • Download URL: csv_remapper_lib-1.0.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Windows/10

File hashes

Hashes for csv_remapper_lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 28181b5654e6965af313a7822a588a4f5ac9f03537823e1385f60b425dda165e
MD5 03f2dc6e42aaab6bc9dd8c72cecef2f0
BLAKE2b-256 f7b5f552110955db3437a4132a55104dafa3a118c90e77d6031815fc5ebc9159

See more details on using hashes here.

File details

Details for the file csv_remapper_lib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: csv_remapper_lib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.10 Windows/10

File hashes

Hashes for csv_remapper_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63fd61c256e38aa0ff5ef2fa671497d07ad2260b2f5ab1c02f94fd634a633258
MD5 b3faf129fd9bc656e125b04fe4569f31
BLAKE2b-256 9c0ce11bc5e5ce84390341f922610d9752ef54fd87a89fef55705f2a265aeb73

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