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: Effortlessly rename columns based on your mapping rules.
  • 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.
  • Convert to JSON: Convert CSV format to JSON.

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.2.1.tar.gz (9.2 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.2.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: csv_remapper_lib-1.2.1.tar.gz
  • Upload date:
  • Size: 9.2 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.2.1.tar.gz
Algorithm Hash digest
SHA256 0b68ffbdd62bcb7dadffd47d2c4a2bddbaec85282391dbfcbe3edb299df231f1
MD5 ec8861f1f7b3d4e606c901522c69f329
BLAKE2b-256 3e2362550169f2f7702182a31ff5e82716a90b07b39b4342f7e24675a9fd6cce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csv_remapper_lib-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ddded4325be212fa4fbd3dc374d51f8bd7447f3263b4c076f9eeecaa9c317952
MD5 228e665f02aa2bfcabb03104edc6a691
BLAKE2b-256 3a8b4fdb4945dfc159a8fe1b2dc9af9a1787d3f04716ec73bd9094ee367528d7

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