Task: Efficient String Trimming in Pandas DataFrame
Task: Efficient String Trimming in Pandas DataFrame: a task in Terminal-Lego-15k (Harbor dataset). You need to create a Python solution that efficiently strips/trims whitespace from all string values in a pandas DataFrame. The current approach using two separate replace() calls with regex is slow…
The task
You need to create a Python solution that efficiently strips/trims whitespace from all string values in a pandas DataFrame. The current approach using two separate `replace()` calls with regex is slow and needs optimization.
Part of PrimeIntellect/Terminal-Lego-15k.