HF RL Explorer

Task: Performance Comparison of Pandas apply vs np.vectorize

Task: Performance Comparison of Pandas apply vs np.vectorize: a task in Terminal-Lego-15k (Harbor dataset). Create a Python script that benchmarks and compares the performance of df.apply() versus np.vectorize() when creating a new DataFrame column from existing columns. Your solution should…

The task

Create a Python script that benchmarks and compares the performance of `df.apply()` versus `np.vectorize()` when creating a new DataFrame column from existing columns. Your solution should demonstrate the performance differences and explain why they occur.

Part of PrimeIntellect/Terminal-Lego-15k.