Others have given you excellent suggestions; I will simply offer an addition -- a side quest, if you will:
Remember that the local single-user databases SQLite and DuckDB exist, and that you can use them to wrangle data without even having to set up a separate server. You just create a database file on your machine and go from there.
You don't even need a database file if you use Malloy, just a .parquet file or .csv file will work. Think of a .parquet file as a python dataframe saved as a file. DuckDB combined with Malloy are a powerful combo. If you like writing SQL queries for fun, you should like writing Malloy queries even more (at least I do). If you are looking to compare timeframes, Malloy does this well: https://docs.malloydata.dev/documentation/patterns/yoy
Postgres running local has good ROI. You can reuse that knowledge on a remote server. More than SQL you can learn about setting up databases and schemas etc.
Remember that the local single-user databases SQLite and DuckDB exist, and that you can use them to wrangle data without even having to set up a separate server. You just create a database file on your machine and go from there.