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 process multiple columns simultaneously, translating text data from one language to another while preserving data integrity. The package outputs the translated DataFrame, 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.
  • 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

If Microsoft Visual C++ 14.0 is not installed, you can download it here: https://visualstudio.microsoft.com/visual-cpp-build-tools/

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 return translated DataFrame
df = trans(df, input_lang='auto', output_lang='en')

df.to_excel("translated_file.xlsx", index=False)

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.

Make multilingual data processing effortless with Doctor Trans. If you find this package helpful, please refer to your developer friends! 🙂

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-1.0.3.tar.gz (166.9 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-1.0.3-cp311-cp311-win_amd64.whl (167.0 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

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

File metadata

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

File hashes

Hashes for doctor_trans-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4a768cb9c2d4d7a065a85beebbbcba7bcc3ed5d7fa41b1a672053db834e0b286
MD5 506e3c0bf05604297673f32be0de6229
BLAKE2b-256 c071870d78f30b6b7fcd3dfd7cf8e7fab905e053163beb259ae48cd8aeef2a71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for doctor_trans-1.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 561a057756506071151e79d2cda756eba04c12d84267f17c28d0c86916bef1c3
MD5 b716cedd54b4d516009a8a76cbb6a18f
BLAKE2b-256 92d9379aad1fab3e41c4d7efd98f5e538bb829b4ac46f7a601f60b051c7276c5

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