## Is your feature request related to a problem?

There's only 2 files where we use pandas, but pandas is 49MB and numpy is another 86MB, slowing down builds massively.

## Describe the solution you'd like

Replace pandas with a pure SQL/Python solution in
- posthog/queries/trends.py
- posthog/queries/sessions.py

Both of those have equivalent examples in Clickhouse (ee/clickhouse) that don't use Pandas.

## Describe alternatives you've considered

Continue using Pandas and clogging builds

## Additional context



#### *Thank you* for your feature request – we love each and every one!

posthog/queries/trends.py
dataframe = dataframe.astype({"breakdown": str})
        for value in dataframe["breakdown"].unique():
            filtered = (
                dataframe.loc[dataframe["breakdown"] == value]
                if value
                else dataframe.loc[dataframe["breakdown"].isnull()]
            )
            df_dates = pd.DataFrame(filtered.groupby("date").mean(), index=time_index)
            df_dates = df_dates.fillna(0)
            response[value] = {key: value[0] if len(value) > 0 else 0 for key, value in df_dates.iterrows()}
    else:
        dataframe = pd.DataFrame([], index=time_index)
        dataframe = dataframe.fillna(0)
        response["total"] = {key: value[0] if len(value) > 0 else 0 for key, value in dataframe.iterrows()}
    return response
def get_interval_annotation(key: str) -> Dict[str, Any]:
    map: Dict[str, Any] = {
        "minute": functions.TruncMinute("timestamp"),
        "hour": functions.TruncHour("timestamp"),
        "day": functions.TruncDay("timestamp"),
        "week": functions.TruncWeek(
            ExpressionWrapper(F("timestamp") + datetime.timedelta(days=1), output_field=DateTimeField())
        ),
        "month": functions.TruncMonth("timestamp"),
    }
    func = map.get(key)
    if func is None:
        return {"day": map.get("day")}  
    return {key: func}
def add_cohort_annotations(team_id: int, breakdown: List[Union[int, str]]) -> Dict[str, Union[Value, Exists]]: