Python 3 || merge & groupby || T/S: 99% / 99%
\n\nimport pandas as pd\n\nmnth = pd.to_datetime("2020-02").to_period(\'M\')\n\ndef list_products(products: pd.DataFrame, orders: pd.DataFrame) -> pd.DataFrame:
\n```\nimport pandas as pd\n\nmnth = pd.to_datetime("2020-02").to_period(\'M\')\n\ndef list_products(products: pd.DataFrame, orders: pd.DataFrame) -> pd.DataFrame:\n\n    orders = orders[orders[\'order_date\'].dt.to_period("M") == mnth\n                ].merge(products[[\'product_id\',\'product_name\']],  on = \'product_id\'\n                ).reset_index()[[\'product_name\',\'unit\']\n                ].groupby([\'product_name\'], as_index = False)[\'unit\'].sum()\n    \n    return orders[orders[\'unit\'] >= 100]\n```\n[https://leetcode.com/problems/break-a-palindrome/submissions/559838984/](https://leetcode.com/problems/break-a-palindrome/submissions/559838984/)\n\nI could be wrong, but I think that time complexity is *O*(*N*log*N*) and space complexity is *O*(*N*), in which *N* ~ `len(products)`.
['Pandas']