## 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/utils.py
return "cache_" + hashlib.md5(stringified.encode("utf-8")).hexdigest()
def get_celery_heartbeat() -> Union[str, int]:
    last_heartbeat = get_client().get("POSTHOG_HEARTBEAT")
    worker_heartbeat = int(time.time()) - int(last_heartbeat) if last_heartbeat else -1
    if 0 <= worker_heartbeat < 300:
        return worker_heartbeat
    return "offline"
def base64_to_json(data) -> Dict:
    return json.loads(
        base64.b64decode(data.replace(" ", "+") + "===")
        .decode("utf8", "surrogatepass")
        .encode("utf-16", "surrogatepass")
    )
def load_data_from_request(request):
    data_res: Dict[str, Any] = {"data": {}, "body": None}
    if request.method == "POST":
        if request.content_type == "application/json":
            data = request.body
            try:
                data_res["body"] = {**json.loads(request.body)}
            except:
                pass
        elif request.content_type == "text/plain":
            data = request.body
        else:
            data = request.POST.get("data")
    else:
        data = request.GET.get("data")