## 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/test/test_trends.py
import json
from datetime import datetime
from typing import List
from freezegun import freeze_time
from posthog.constants import TRENDS_LIFECYCLE, TRENDS_TABLE
from posthog.models import Action, ActionStep, Cohort, Event, Filter, Organization, Person
from posthog.queries.abstract_test.test_interval import AbstractIntervalTest
from posthog.queries.abstract_test.test_timerange import AbstractTimerangeTest
from posthog.queries.trends import Trends
from posthog.test.base import APIBaseTest
from posthog.utils import relative_date_parse
def trend_test_factory(trends, event_factory, person_factory, action_factory, cohort_factory):
    class TestTrends(AbstractTimerangeTest, AbstractIntervalTest, APIBaseTest):
        def _create_events(self, use_time=False):
            person = person_factory(
                team_id=self.team.pk, distinct_ids=["blabla", "anonymous_id"], properties={"$some_prop": "some_val"}
            )
            _, _, secondTeam = Organization.objects.bootstrap(None, team_fields={"api_token": "token456"})
            freeze_without_time = ["2019-12-24", "2020-01-01", "2020-01-02"]
            freeze_with_time = [
                "2019-12-24 03:45:34",
                "2020-01-01 00:06:34",
                "2020-01-02 16:34:34",
            ]
            freeze_args = freeze_without_time
            if use_time: