Using Pandas will require you to copy all the data into the client and process it locally. For a large dataset this can be a significant overhead. With the aggregation framework the processing is done inside the database cluster with no network transfer or local storage overheads. You can also easily streams your results into another collection using $out.
1 Like