pandas || 4 lines, merge and sets || T/S: 99% / 99%
\nimport pandas as pd\n\ndef sales_person(sales_person: pd.DataFrame, company: pd.DataFrame, orders: pd.DataFrame) -> pd.DataFrame:\n\n    company = company.ren
```\nimport pandas as pd\n\ndef sales_person(sales_person: pd.DataFrame, company: pd.DataFrame, orders: pd.DataFrame) -> pd.DataFrame:\n\n    company = company.rename(columns = {\'name\': \'color\'})\n\n    df = orders.merge(company, on = \'com_id\'\n              ).merge(sales_person, on = \'sales_id\')\n\n    res = list(set(sales_person.name) - set(df[df.color == "RED"].name))\n   \n    return pd.DataFrame({\'name\':res})\n```\n[https://leetcode.com/problems/sales-person/submissions/1085768187/](https://leetcode.com/problems/sales-person/submissions/1085768187/)\n\nI could be wrong, but I think that time complexity is *O*(*N* ^2)  and space complexity is *O*(*U*), in which *N* ~ `len(sales_persons)` and *U* ~ the number of distinct elements in `sales_persons`.
['Pandas']