Yes CTEs are nice for sure ... But for fine-grained analysis, I still would use them to do any joins I don't want to do on the client, cut down the data size, then export to a "real language" for the details
IMO SQL and tidyverse in R are an ideal combo; this post compares Pandas and tidyverse:
https://www.oilshell.org/blog/2018/11/30.html
I agree that using Python for everything is suboptimal. I'm a big Python user, but for analytics I mostly skip Python, and use SQL and R