How to Convert SQL into Python Pandas? Part 3

Informula
Dev Genius
Published in
2 min readApr 28, 2023

--

Previously on How to Convert SQL into Python Pandas? Part 2, we talked about how to convert SQL statements into Pandas syntax. In this article, we will continue to discover more scenarios and operations. (Data import into Python)

Group by and sum

-- SQL
select CustomerId, SUM(Total) As totalsum
from "main"."invoices"
GROUP BY CustomerId

--

--