If you can write an Excel formula, you can build your own function.
These are my go-to libraries for Python data crunching.