## 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
sign_up_action, person = self._create_events()
            person_factory(team_id=self.team.pk, distinct_ids=["someone_else"])
            for value in values:
                event_factory(
                    team=self.team, event="sign up", distinct_id="someone_else", properties={"some_number": value}
                )
            event_factory(team=self.team, event="sign up", distinct_id="someone_else", properties={"some_number": None})
            return sign_up_action
        def _test_math_property_aggregation(self, math_property, values, expected_value):
            sign_up_action = self._create_maths_events(values)
            action_response = trends().run(
                Filter(
                    data={"actions": [{"id": sign_up_action.id, "math": math_property, "math_property": "some_number"}]}
                ),
                self.team,
            )
            event_response = trends().run(
                Filter(data={"events": [{"id": "sign up", "math": math_property, "math_property": "some_number"}]}),
                self.team,
            )
            
            self.assertAlmostEqual(action_response[0]["data"][-1], expected_value, delta=0.5)
            self.assertTrue(self._compare_entity_response(action_response, event_response))
        def test_sum_filtering(self):
            self._test_math_property_aggregation("sum", values=[2, 3, 5.5, 7.5], expected_value=18)
        def test_avg_filtering(self):