Pandas sum vs. SQL sum

Viewed 29

Is there a difference between pandas sum() function and SQL SUM(...) function. I'm using tables with around 100k rows. My current test runs were not good. The runtime was always different with both being not predictable (problem might be my bad wifi...) It will run on a server later, but maybe someone knows it already and I don't have to pay for my server now.

Thanks in advance!

1 Answers

It might be hard to get a clear answer without actual tests because it depends so much on what machines are used, what you are willing to pay for each part, ...

However, aggregating the data in SQL gives you less network traffic, which can be valuable a lot of the time.

Related