Skip to main content

This package translate whole dataframe in any language without any limits.

Project description

Doctor Trans

Doctor Trans is a powerful Python package for translating large datasets in a DataFrame format. It leverages multithreading to process multiple columns simultaneously, translating text data from one language to another while preserving data integrity. The package outputs the translated DataFrame as an Excel file, making it perfect for large-scale multilingual data processing in business and research.

Features

  • Automatic Language Detection: Automatically detects the source language if not specified.
  • Multiple Language Support: Supports translation to and from any language available in Google Translate.
  • Multithreading: Translates multiple columns concurrently for faster processing.
  • Customizable Output: Allows users to specify the output language and filename for the translated Excel file.
  • Error Handling and Logging: Provides detailed logging to track translation status and handle errors effectively.

Installation

To use Doctor Trans, ensure the following packages are installed:

pip install pandas requests openpyxl Cython
import pandas as pd
from doctor_trans import trans

# Sample data
data = {
    'Name': ['Hola', 'Bonjour', 'Ciao'],
    'Description': ['Buenos días', 'Bonne journée', 'Buona giornata']
}
df = pd.DataFrame(data)

# Translate the DataFrame to English and save as an Excel file
trans(df, input_lang='auto', output_lang='en', download_file_name='to\path\translated_output.xlsx')

Parameters

  • df: The DataFrame containing text data to translate.
  • input_lang: (optional) The source language code. Default is 'auto' for automatic detection.
  • output_lang: (optional) The target language code. Default is 'en' for English.
  • download_file_name: (optional) Filename for the translated output file. Default is translated_output.xlsx.

Make multilingual data processing effortless with Doctor Trans. If you find this package helpful, please consider giving it a star! 🙂

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

doctor_trans-0.1.8.tar.gz (119.6 kB view details)

Uploaded Source

Built Distribution

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

doctor_trans-0.1.8-cp311-cp311-win_amd64.whl (119.0 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file doctor_trans-0.1.8.tar.gz.

File metadata

  • Download URL: doctor_trans-0.1.8.tar.gz
  • Upload date:
  • Size: 119.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for doctor_trans-0.1.8.tar.gz
Algorithm Hash digest
SHA256 751453803ba6c9ae22a5743af41ea1892075f20088505faa08fb88ec17871f11
MD5 74ded6816f13407b77dfca1c73674e90
BLAKE2b-256 78bd422f93ab8d0366e8921805233cf57569cd96642810eb815ac5ca2b9c7146

See more details on using hashes here.

File details

Details for the file doctor_trans-0.1.8-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for doctor_trans-0.1.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dd053fe8069e3ca052acec4b26e56a45dd9ba58ec34493db9a4f0b7eefdd6570
MD5 528a37970a4a066f9f7424e4a4cc1a3d
BLAKE2b-256 5b872965b130e8fe3cfb35e2e3bf0a576d88a3916a7108b8c01d998e3c16f2e4

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