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.1.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.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csv_remapper_lib-1.1.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.0 Windows/11

File hashes

Hashes for csv_remapper_lib-1.1.0.tar.gz
Algorithm Hash digest
SHA256 a71b9e6ad50c693f2b592b01bfafdd6a9a7e5ad562e4cec117e6c0ba0771c089
MD5 97f61b81f79e39c38184e5e69f295686
BLAKE2b-256 5103900003f65cbf87b114c7f5c986f4485a9a071fd277ad7ba4dd846dad4774

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csv_remapper_lib-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.0 Windows/11

File hashes

Hashes for csv_remapper_lib-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fffed6d88cfe15b6406cc3b6440a2c885f32fe9e0be434c125a0e91814eaf4cc
MD5 c8928ffc9b3771136e58817a6e706f7e
BLAKE2b-256 c7a6cdc6a45da99aafbe3dcee006d4e75589b4bf7e0af6e74e4020d728a6eced

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