These are my solutions in Pandas for Hannukah of Data.
For most of my answers, I attempted to be as single execution as possible.
Leveraging
pd.DataFrame.pipe
as much as possible to resemble R and SQL.
Thanks to saulpw and the Devottys for these amazing puzzles.
For 2024 (Noah's Rug), I decided to give Polars a shot.
Other than Pandas, the sole requirement for this is Pyperclip, highly recommended to manipulate the clipboard with Python.
For any curious why there is an identical .py
and a .ipynb
file, I usually
write everything like a Jupyter Notebook as a script by using
Jupytext. While this
is not a requirement to run either; it is a nicety to use both advantages of a
Python script and the exploratory nature of Jupyter Notebooks.