Pandas - Simple solution
Approach\n1. Retrieve the content of the conditions field.\n2. Create a function to split each conditions by a space \' \' and check whether it starts with DIAB
# Approach\n1. Retrieve the content of the `conditions` field.\n2. Create a function to split each `conditions` by a space `\' \'` and check whether it starts with `DIAB1` or not.\n\n# Code\n```\nimport pandas as pd\n\ndef find_patients(patients: pd.DataFrame) -> pd.DataFrame:\n    return patients[patients[\'conditions\'].apply(is_valid)]\n\ndef is_valid(content: str) -> bool:\n    return any([x.startswith(\'DIAB1\') for x in content.split()])\n```
['Python3', 'Pandas']