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

Uploaded Python 3

File details

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

File metadata

  • Download URL: csv_remapper_lib-1.2.2.tar.gz
  • Upload date:
  • Size: 9.3 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.2.tar.gz
Algorithm Hash digest
SHA256 b1370157ce45732f37d02aa1706b3bfb0c9f1bd9c75a749b593544cf681c2002
MD5 931742f6e0d8883ba20d25494cce8121
BLAKE2b-256 5a6fb9dc5f529b60c1d006ae6309345063bac1818b405a7b85e7f7bd1a95325e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: csv_remapper_lib-1.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a3653133d39b368fc1617b7f4e2510a297f7cf1d15d13f86bf46afcd4ddfdb8
MD5 9f161f9bb52568fdcd38cfdf446d43a6
BLAKE2b-256 80ea50f37991afa2607331875e98a51b7d119ef279ee16fd18f520def10d3ba7

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