5 Python Decorators I Use in Almost All My Data Science Projects

Decorators provide a new and convenient way for everything from caching to sending notifications.

Thuwarakesh Murallie
Towards Data Science
6 min readMar 13, 2023

--

Python decorators are excellent way to give new behavior to our functions. It reduces code repetition and help us maintain clean codebase. They are helpful in data science projects in many ways from caching to sending notifications.
Photo by Elena Mozhvilo on Unsplash

At first, every developer’s goal is to get things working. Slowly, we worry about readability and scalability. This is when we first start thinking about decorators.

--

--

I write about data science and consult at Stax, where I help clients unlock insights from data to drive business growth. https://www.the-analytics.club