## 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/sessions/sessions.py
events = self.events_query(filter, team)
        calculated = []
        
        if filter.compare and filter._date_from != "all" and filter.session == SESSION_AVG:
            calculated = self.calculate_sessions(events.filter(filter.date_filter_Q), filter, team)
            calculated = convert_to_comparison(calculated, filter, "current")
            compare_filter = determine_compared_filter(filter)
            compared_calculated = self.calculate_sessions(
                events.filter(compare_filter.date_filter_Q), compare_filter, team
            )
            converted_compared_calculated = convert_to_comparison(compared_calculated, filter, "previous")
            calculated.extend(converted_compared_calculated)
        else:
            events = events.filter(filter.date_filter_Q)
            calculated = self.calculate_sessions(events, filter, team)
        return calculated
    def calculate_sessions(self, events: QuerySet, filter: Filter, team: Team) -> List[Dict[str, Any]]: