Another advantage you get is if you wanted to look at these intermediate data, you don't need to run your code in debug mode and view the dataframe at a breakpoint - you can use something like datasette[1] or a standard SQLite DB viewer.
So a function that does complex data processing has approximately this structure my code:
(1) <non-pandas python code to fetch data, other "normal" stuff>
(2) <pandas code to do basic navigation, filtering, grouping etc>
(3) <dump to SQLite, followed by SQL queries for the really heavy stuff>
(4) <back to python, possibly pandas, to return results, write to a file, plot etc>
Step (3) used to be pandas for me before, but depending on how complex your operations are this can become hard to read and/or review.[1] https://github.com/simonw/datasette - datasette doesnt replace a standard DB IDE, but is a very good lightweight alternative to one if don't intend to perform updates/inserts directly on a table.
It has some plotting built in. Not sure if it is sophisticated enough for what you need but it might be worth a try.
Sqlite is OLTP though, for analytical purposes I'd use an OLAP DB like DuckDB.
IMO dumping workload in DB is nice, specially when your dataset doesn't fit in RAM.