Easy to understand Pandas solution
IntuitionI thought of how to use multiple aggregation function and save the values in different columns. I also needed to alphabetically sort the products as re
# Intuition
I thought of how to use multiple aggregation function and save the values in different columns. I also needed to alphabetically sort the products as required in the test cases. Meaning: the product starting with an alphabet which comes before any other should be the first.

# Approach
1. Group the dataframe.
2. use .agg function which will let us use multiple aggregation and other functions.
3. create new columns and feed values using aggregation functions on product column
4. .nunique() aggregation function will generate numerical count of unique products
5. I used lambda function to apply ','semicolon and join alphabetically sorted products
6. .set() was used to remove duplicate products (same products which are bought on the same day)
7. lastly, reset_index() function was used to convert the grouped df into a normal dataframe

# Complexity
- Time complexity:
### O(NLogN)

- Space complexity:
### O(N)

# Code
```pythondata []
import pandas as pd

def categorize_products(activities: pd.DataFrame) -> pd.DataFrame:
    
    df = activities.groupby('sell_date').agg(
        num_sold = ('product','nunique'),
        products = ('product',  lambda x: ','.join(sorted(set(x))))  # Sort and join unique product names
    ).reset_index()
    
    return df
```
# This is my first solution I uploaded so please upvote me if you find it helpful. 
['Pandas']