socio4health.utils.harmonizer_utils.s4h_translate_column#
- socio4health.utils.harmonizer_utils.s4h_translate_column(data: DataFrame, column: str, language: str = 'en') DataFrame[source]#
Translates Portuguese or Spanish content in a DataFrame to English using a local model.
The model is downloaded on first use and then reused from the local Hugging Face cache. Repeated values are translated only once per Python process.
- Parameters:
- Return type:
Original DataFrame with new column translated.