HF RL Explorer

Task: Test if a String Contains One of the Substrings in a List using Pandas

Task: Test if a String Contains One of the Substrings in a List using Pandas: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that demonstrates how to efficiently check if strings in a Pandas Series contain any substring from a given list. The solution should use Pandas'…

The task

Write a Python script that demonstrates how to efficiently check if strings in a Pandas Series contain any substring from a given list. The solution should use Pandas' built-in string methods with regex to achieve this in an elegant, single-expression approach.

Part of PrimeIntellect/Terminal-Lego-15k.